I've asked Nepster to take a look at this one, due to him being more familiar with the code in question (as he rewrote it at some point).
What I have noticed about this issue:
It appears to occur when any of the following is true for the object's initial position:
- X coordinate is -2 or lower
- X coordinate is (level width) + 1 or higher
- Y coordinate is 2 or lower
- Y coordinate is (level height) + 5 or higher
Initial position seems to be the only factor that matters. The direction and speed of movement, and the size of the object, do not. (Tested with most but not all directions, at a few different speeds; and with both moving backgrounds in lpiv_space plus the one in lpv_honeycomb).
An object does not get "stuck" if it later ends up in such a position either. Only the position it starts in matters.