Overhaul of the way line numbers are handled in errors, issue #137