I was able to replicate this.
I stood in a corridor (a.k.a a tunnel) within a dungeon, having moved north to get into the corridor.
I pressed w+5 (to wait on the spot). The message buffer said "You wait for some time. You walk to the north. You walk to the north."; and I ended up 2 paces north of where I started in the corridor.
I have only been able to replicate this within a corridor, not in an open space.