Fix part 1 of bug #9771 with assertion violation in move_it_by_lines.