Small lexer optimisation using the \G assertion.

This is a follow-up to #6