I kind of know what you mean. In my case, it was due a psychedelic substance. I vividly remember being inside, walking out in the street and opening the door to go out, in that order. Made me feel very confused because I knew that logically it could not have gone that way, yet that was the chronology in my mind.