Fix lineAtHeight when asking past end, but last line is collapsed