Fix the endless loop when indenting a non-empty last line of a file.
This was caused because the startOfLine positioning will cause atEnd() to never return true, this change simply checks that it could move to the next block instead.