It appears that there is some sort of 8-direction key press buffer that is active even when the behavior is turned off. If I just tap the arrow up key very briefly so that the sprite moves into the gravity zone then it works ok, but if I long-press the up arrow key when the sprite is already above the line then the duration of that key press seems to have some impact on whether or not the sprite will misbehave.
Not sure what the answer to the problem might be, though. If you just want to simulate falling due to gravity then using custom movement or taking more control of the default 8-direction behavior might be a better option (I've found that mixing movement behaviors like this is often more trouble than it's worth).
Edit - link deleted: the solution is posted below...