Invalid line number on error. Fixes #1542