Fix infinite loop in identifier lexing