Fixed checking for invalid lines

Fixes #165.

Test plan:

 * Opened a file
 * Caused a lint error on the final line
 * Deleted a line from the middle of the file
 * No error