Fix bug #17823 with vertical-motion in lines with line-prefix.