Fix typo in previous change; it mishandled the case when line_end was