Ref T10576. In the test case there, XHPAST has incorrectly emitted an extra newline at the top of the output.
This cascades downward and throws every line off by one, highlighting the wrong lines in the output.
Fix this issue by stripping the prefix more carefully, so the input source is preserved accurately.