Avoid overwriting next and previous-error in LaTeX mode