When you are disallowed from moving left or right whilst in mid-air, the player is unable to move in that direction even once the obstacle has been cleared by having fallen past it. In order to move in that direction again, the player must first move in the opposite direction to reset the flag.