I've only been able to reproduce this glitch once, and never again. I'm still not quite sure what's causing it, because it looks to me like it's working fine.
I'll explain how I think it works: to the right of the screen in the attached picture (x1009y999), as well as in the screen above that (x1009y998), Flag Warps are placed so that entering those screens will warp the player one screen to the left, which is the screen you came from. If you are in the upper screen (x1009y998) and exit right, you'll end up on the same screen, only on the left side, so you have enough time to change directions and exit the screen left: since there's no Warp instruction for exiting left, you simply end up in (x1008y998), i.e. a void.
If you thought Flag B would have superseded Flag A in the Flag Warp, you'd be mistaken (I believe the game checks Flags in order); otherwise there's really no problem, just put an empty sky screen in x1008y998 and you're done.