Restore lexer state if available.