locate: use Lexing.compare_pos to compare positions.
Fixes bug introduced in 5ecd37e9737299ed9b2d474c4756dd34d5be76a1