Add code to fix bad error message for "before text" by first moving forward the buffer position till the error line.