Fix issue with looping LaTeX-processes on some input.