Improve robustness around parsing line numbers, also improve error messages.