Fixed an error formatting issue

When using tab for code indent, the error marker will be wrongly positioned.

For example see the newly added test case f7b36054fcbcc0c26f