Correct previousVisiblePosition() when next to a block