Filed 3/1/17 Unmodified opinion attached


                  CERTIFIED FOR PUBLICATION



    IN THE COURT OF APPEAL OF THE STATE OF CALIFORNIA

                     SECOND APPELLATE DISTRICT

                               DIVISION FOUR




BANK OF NEW YORK MELLON,                       B262899

       Plaintiff and Appellant,                (Los Angeles County
                                               Super. Ct. No. SC120390)
                v.
                                               MODIFICATION ORDER
CITIBANK, N.A.,                                [NO CHANGE IN
                                               JUDGMENT]
        Defendant and Respondent.



THE COURT:*
     It is ordered that the opinion filed on February 16,
2017, be modified as follows:

     On the caption page, the attorney listing for Plaintiff
and Appellant Bank of New York Mellon shall be changed to
read: “Garrett & Tully, Ryan C. Squire, Zi C. Lin and
John C. Tully, for Plaintiff and Appellant.”

     This modification does not change the judgment.




*EPSTEIN, P. J.        WILLHITE, J.           COLLINS, J.




                             2
Filed 2/16/17 Unmodified opinion



                 CERTIFIED FOR PUBLICATION



    IN THE COURT OF APPEAL OF THE STATE OF CALIFORNIA

                     SECOND APPELLATE DISTRICT

                               DIVISION FOUR




BANK OF NEW YORK MELLON,                       B262899

       Plaintiff and Appellant,                (Los Angeles County
                                               Super. Ct. No. SC120390)
                v.

CITIBANK, N.A.,

        Defendant and Respondent.


     APPEAL from a judgment of the Superior Court of Los
Angeles County, Allan J. Goodman and H. Chester Horn,
Judges. Reversed and remanded.
     Garrett & Tully, Ryan C. Squire and John C. Tully, for
Plaintiff and Appellant.
     Lewis Brisbois Bisgaard & Smith, Roy G. Weatherup
and Daniel G. Bath, for Defendant and Respondent.
              ______________________________

      Bank of New York Melon appeals from the judgment of
dismissal of its lawsuit against respondent Citibank, N.A.
The case arose out of the simultaneous refinancing of a home
equity line of credit by two different lenders in 2006, which
resulted in a dispute over the priority of their recorded deeds
of trust. Appellant challenges the orders sustaining
respondent’s demurrers to appellant’s first and second
amended complaints. The demurrers alleged that all of
appellant’s causes of action were barred by the three-year
statute of limitations in Code of Civil Procedure section 338
(hereafter, section 338). We reverse the judgment because
appellant has stated a claim for equitable subrogation, which
is not subject to that statute.

        FACTUAL AND PROCEDURAL SUMMARY
      In May 2005, respondent’s predecessor in interest,
Citibank (West) FSB (hereafter, Citibank West) issued a
home equity line of credit of up to $500,000 (hereafter, first
line of credit) to James and Cathleen Lima and recorded a
deed of trust securing that line of credit against the Limas’
home in Pacific Palisades.
      In January 2006, the Limas simultaneously negotiated
a refinancing of the first line of credit with both Citibank
West and appellant’s predecessor in interest, Countrywide




                              2
Home Loans, Inc. (hereafter, Countrywide) First American
Lenders Advantage (hereafter, First American) was
Countrywide’s escrow agent for the refinancing. The
agreement with the Limas was that Countrywide would pay
off Citibank West’s first line of credit, obtain a reconveyance
of Citibank West’s deed of trust, and receive a second deed of
trust on the property as security for its loan.1 Unbeknownst
to Countrywide, on January 17, 2006, the Limas signed loan
documents to refinance the first line of credit with a new line
of credit from Citibank West (hereafter, second line of
credit). The second line of credit had a limit of up to
$600,000 and was secured by a deed of trust recorded on
January 31, 2006.
      On January 19, 2006, Citibank West issued a payoff
statement for $508,527.65, without disclosing that the first
line of credit was being refinanced. The payoff statement
indicated that the account on the first line of credit had been
“frozen.” The instruction sheet accompanying the statement
specified that an enclosed “close/termination letter” was to
“accompany the payoff funds in order to acquire a release of
lien. If this letter is not returned with the payoff funds, the
line will remain OPEN and will be considered a paydown
only.” The termination letter similarly directed the
borrowers to request “that the account be closed and the lien



     1The first deed of trust on the property is held by a
non-party to this action.




                               3
released along with your payoff to ensure proper processing
of your transaction.”
      The Limas’ February 7, 2006 loan application to
Countrywide sought a line of credit of up to $1 million. It
disclosed Citibank West’s first, but not its second, line of
credit. The second line of credit was not picked up in the
preliminary title report on which Countrywide relied. Also
on February 7, the Limas executed a line of credit agreement
and deed of trust in favor of Countrywide. Countrywide
recorded its deed of trust on the Limas’ property on
February 13, 2006, the day escrow closed on its line of credit.
The next day, First American disbursed the $508,567.65
payoff to Citibank West, $181,289.35 in cash to the Limas,
and the remaining funds to other creditors of the Limas.
First American transferred the Limas’ signed termination
letter to Citibank West. The letter instructed the bank to
close the first line of credit, which was identified by its
account number.
      In March 2006, Citibank West returned the
$508,567.65 payoff amount to First American, notifying it
that the first line of credit had been closed. At First
American’s request, Citibank West issued a payoff statement
for the second line of credit in the amount of $612,513.98.
Like the first, the second payoff statement indicated that the
relevant account was frozen and warned that the line of
credit would remain open unless the Limas submitted a
signed termination letter with their payoff. After
negotiating down the amount due on the second line of




                               4
credit, First American obtained a partial refund from the
Limas and disbursed $599,567.65 to Citibank West; as a
result, Citibank West reduced the account balance on the
second line of credit to zero. The Limas did not sign the
termination letter that accompanied Citibank West’s payoff
statement as to the second line of credit, and Citibank West
did not close that account and did not reconvey the deed of
trust by which it was secured.
      In 2007, the Limas borrowed $600,000 on their second
line of credit with Citibank West. In January 2011, Citibank
West’s trustee issued a notice of default and election to sell
the Limas’ home. In March 2013, appellant filed this action
against Citibank West and the Limas. The first amended
complaint substituted respondent as Citibank West’s
successor in interest. Against respondent, appellant
asserted claims for declaratory relief based on violation of
statute or statutory subordination (Civ. Code, § 2943),
equitable subordination or subrogation, unjust enrichment,
and constructive fraud; against the Limas, it asserted a
claim of actual fraud.
      Respondent demurred on the sole ground that all
causes of action were barred by the three-year statute of
limitations in section 338, subdivisions (a) (violation of duty
imposed by statute) and (d) (fraud or mistake). Appellant
opposed the demurrer, arguing that Citibank West’s lien was
discharged by operation of law, that there was no actual
controversy until respondent claimed priority in 2011 and
appellant discovered its claims for fraud and unjust




                               5
enrichment, and that the 10- or 60-year statute of
limitations for enforcing a power of sale in a deed of trust
(Civ. Code, § 882.020) applied to its equitable subrogation
and subordination claims.
      The court, Judge Allan J. Goodman, ruled Civil Code
section 882.020 did not apply because appellant’s claims
were not based on the power of sale in a deed of trust, and
the first amended complaint did not plead facts consistent
with delayed discovery. The court sustained the demurrer
as to all causes of action and allowed amendment only as to
the causes of action for unjust enrichment and fraud.
      Accordingly, the only causes of action asserted against
respondent in the second amended complaint were for unjust
enrichment and constructive fraud. For the first time in
that complaint, appellant alleged that First American “and
its escrow officer were not agents of Countrywide in
undertaking actions [to pay off the second line of credit],
without Countrywide’s knowledge and authorization, after
the Countrywide loan closed and after the Countrywide deed
of trust was recorded.” Once again, respondent demurred on
statute of limitation grounds, and the court, Judge H.
Chester Horn, sustained the demurrer without leave to
amend. The court rejected appellant’s attempt to plead
around its original allegations in order to bring its claims
within the delayed discovery rule.
      This appeal followed the entry of judgment dismissing
respondent from the action.




                              6
                         DISCUSSION
      We review a ruling on demurrer de novo to determine
whether the complaint states a cause of action under any
legal theory. (Quelimane Co. v. Stewart Title Guaranty Co.
(1998) 19 Cal.4th 26, 38.) In doing so, we are not bound by
the trial court’s reasoning and may consider new legal
theories or pure questions of law presented by undisputed
facts for the first time on appeal. (Pierce v. San Mateo
County Sheriff’s Dept. (2014) 232 Cal.App.4th 995, 1006; B &
P Development Corp. v. City of Saratoga (1986) 185
Cal.App.3d 949, 959.)
      We construe the complaint liberally, take all properly
pled facts as true, and draw all reasonable inferences in
favor of the plaintiff. (Coleman v. Medtronic, Inc. (2014) 223
Cal.App.4th 413, 422; Berg & Berg Enterprises, LLC v. Boyle
(2009) 178 Cal.App.4th 1020, 1034.) Inconsistent allegations
in amended complaints are disregarded unless the
inconsistency is explained. (Holland v. Morse Diesel
Internat., Inc. (2001) 86 Cal.App.4th 1443, 1447.) Exhibits
attached to the complaint take precedence to the extent they
contradict allegations in the complaint. (Ibid.)
      To determine which statute of limitations applies to a
particular action, we consider the “gravamen” of the action
rather than its form or the relief demanded. (Yee v. Cheung
(2013) 220 Cal.App.4th 184, 194.) The gravamen of an
action depends on the nature of the right sued upon or the
principal purpose of the action. (Davies v. Krasna (1975) 14
Cal.3d 502, 515.)




                              7
                                  I
       Contrary to respondent’s perception, appellant has not
abandoned the claims in its first amended complaint, to
which respondent’s first demurrer was sustained without
leave to amend. Appellant’s opening brief makes clear that
it challenges the sustaining of both demurrers on the ground
that the three-year statute of limitations in section 338 does
not apply to any of its claims. We, therefore, consider
whether section 338 applies to the claims for declaratory
relief asserted in the first amended complaint.
       A claim for declaratory relief is subject to the same
statute of limitations as the legal or equitable claim on
which it is based. (Mangini v. Aerojet-General Corp. (1991)
230 Cal.App.3d 1125, 1155.) Appellant argues that because
it seeks a declaration of its interest in the Limas’ property,
the claims for declaratory relief in effect seek to quiet title to
that property and are not subject to a statute of limitations.
It derives that proposition from the dissent in Ephraim v.
Metropolitan Trust Co. of Cal. (1946) 28 Cal.2d 824. (Id. at
p. 839 (dis. opn. of Carter, J.).) That is not the modern rule.
The majority in Ephraim held that where quiet title depends
upon another claim, it must stand or fall on that claim. (See
id. at p. 833; see also Leeper v. Beltrami (1959) 53 Cal.2d
195, 214 [“the modern tendency is to look beyond the relief
sought, and to view the matter from the basic cause of action
giving rise to the plaintiff’s right to relief”].) Thus, the
statute of limitations on a quiet title action is determined
with reference to the underlying theory of relief. (Muktarian




                                8
v. Barmby (1965) 63 Cal.2d 558, 560; Salazar v. Thomas
(2015) 236 Cal.App.4th 467, 476.) We, therefore, examine
the theories underlying the claims for declaratory relief.
   A. Statutory Subordination
       In the first amended complaint, appellant asserted a
claim variously titled as “VIOLATION OF STATUTORY
OBLIGATIONS” and “Declaratory relief re Statutory
Subordination of Trust Deed.” The claim was based on the
following allegations: under Civil Code section 2943,
subdivisions (a)(5) and (d)(1), Countrywide and its escrow
agent were entitled to rely on Citibank’s January 19, 2006
statement to determine the payoff amount for 30 days
following the date of that statement; under Civil Code
section 2941, Citibank was “obligated by statute” to reconvey
the deed of trust within 30 days of receiving Countrywide’s
payoff on March 17, 2006; and under Civil Code section
2943, subdivision (d)(3) any amount the borrower owed to
the lender that was not included in the payoff statement
became an “unsecured obligation.” Based on these
allegations, appellant requested a declaration that its deed
of trust was senior to respondent’s, to the extent respondent
had a valid security interest at all.
       Respondent demurred under section 338, subdivision
(a) on the ground that appellant’s claim was based on a
violation of a duty imposed by statute. In opposition,
appellant retreated from its theory that Citibank West
violated its statutory duty to reconvey and argued instead,
as it does on appeal, that a reconveyance was not even




                              9
necessary because Citibank West’s lien on the second line of
credit was automatically extinguished at payoff. According
to appellant, the essence of its theory of statutory
subordination is that its deed of trust has priority “by
operation of law.”
         We are not convinced that appellant’s claim to lien
priority sounds in law. “‘California follows the ‘first in time,
first in right’ system of lien priorities. ([Civ. Code,] § 2897.)’
(Thaler v. Household Finance Corp. (2000) 80 Cal.App.4th
1093, 1099.) However, that rule is not without exceptions.
‘Other things being equal, different liens upon the same
property have priority according to the time of their creation
. . . .’ (Civ.Code, § 2897, italics added.) It appears the
Legislature used the words ‘other things being equal’ to refer
to the equities involved in a competing liens situation.” (JP
Morgan Chase Bank, N.A. v. Banc of America Practice
Solutions, Inc. (2012) 209 Cal.App.4th 855, 860.)
         Appellant relies on Civil Code sections 2941 and 2943,
but those provisions do not establish the priority of its lien
as a matter of law.
         Under Civil Code section 2943, subdivision (a)(5), a
payoff statement must set forth the amounts required “to
fully satisfy all obligations secured by the loan that is the
subject of [that] statement.” Such a statement may be relied
on “in accordance with its terms.” (Id., § 2943, subd. (d)(1).)
“[A]ny sums that were due and for any reason not included
in the statement” are “recoverable by the beneficiary as an
unsecured obligation.” (Id., § 2943, subd. (d)(3).) The




                                10
provision that a deficiency in the payoff of a loan is no longer
secured is a departure from the common law, which allowed
reinstatement of an erroneously retired loan. (See Freedom
Financial Thrift & Loan v. Golden Pacific Bank (1993) 20
Cal.App.4th 1305, 1314–1315, disapproved on another
ground in Ghirardo v. Antonioli (1996) 14 Cal.4th 39, 53, fn.
5.)
      Civil Code section 2943, subdivision (d)(3) has no
bearing on appellant’s claim. Citibank West issued the
January 2006 payoff statement as to its first line of credit.
Any amounts that may have been due on Citibank West’s
second line of credit were not required to be included in it
because that loan was not the subject of the payoff
statement. Moreover, any future advances on the second
line of credit could not have been due at all before they were
made, let alone be due on the first line of credit. Appellant
cannot claim that the second line of credit became unsecured
by virtue of the payoff statement issued on the first line of
credit.
      The other statute on which appellant relies, Civil Code
section 2941, does not provide for lien priority at all. It
establishes deadlines and procedures for the reconveyance of
a lien after a mortgage has been satisfied and provides for
damages and a penalty. (Id., § 2941, subd. (d).) Appellant
denies seeking damages arising from Citibank West’s failure
to record a reconveyance. Civil Code section 2941 makes no
exception for lines of credit, and its procedures have been




                               11
applied to such loans. (See Serafin v. First Interstate Bank
(1997) 58 Cal.App.4th 785, 787, 790–796, superseded by
statute on another ground as stated in Markowitz v. Fidelity
Nat. Title Co. (2006) 142 Cal.App.4th 508, 524–525.)
However, nothing in the statute requires that a mortgage be
considered satisfied in all cases where the debt is reduced to
zero; nor is there support for such a blanket rule at common
law.
      It is true that “[a] security interest cannot exist
without an underlying obligation, and therefore a mortgage
or deed of trust is generally extinguished by either payment
or sale of the property in an amount which satisfies the lien.
[Citations.]” (Alliance Mortgage Co. v. Rothwell (1995) 10
Cal.4th 1226, 1235, italics added.) However, it has long been
recognized that whether the payment of a debt operates to
release the lien of a mortgage depends on the mortgage’s
terms and conditions. (See Frank H. Buck Co. v. Buck (1912)
162 Cal. 300, 303, superseded by statute on another ground
as stated in Equitable Plan Co. v. Dix Box Co. (1958) 163
Cal.App.2d 705, 708.) When a mortgage is “designed by its
very terms . . . to afford the mortgagee security for his future
advances to the mortgagor, much more is required for the
extinguishment of the lien than the mere accidental
circumstance that the books of one or another of the parties
show a balance in favor of the mortgagor upon a given date.”
(Frank H. Buck Co., at p. 303–304; see also Rest.3d Property,
Mortgages, § 6.4, com. e, p. 428 [principle that mortgage is
not extinguished on payment of debt if loan or payment




                              12
documents provide to the contrary is most commonly applied
to line-of-credit loans].)
      Here, Citibank West’s deed of trust on the second line
of credit expressly secures future loan advances and provides
that the lien will be released upon payment of all
obligations, and upon the expiration of the agreement or
upon the borrower’s request. Accordingly, the instructions
accompanying each of Citibank West’s payoff statements
required that the borrowers sign a termination letter, and
warned that the payoff would otherwise be considered a
paydown. Appellant’s own exhibits indicate that the
termination letter accompanying the March 2006 payoff
statement on the second line of credit was not signed by the
borrowers.
      Appellant argues that the payoff statement was
misleading in several respects—for example, because it
indicated the account was “frozen,” even though the
termination letter required the borrowers’ authorization to
“freeze/close the account.” Appellant also argues Citibank
West did not strictly enforce the terms of its payoff
statement because it accepted a payoff amount lower than
the one listed on the statement. Assuming these arguments
support a claim of equitable estoppel against respondent,
they nevertheless fail to support a claim to statutory lien
priority as a matter of law. (See Vu v. Prudential Property &
Casualty Ins. Co. (2001) 26 Cal.4th 1142, 1152–1153 [claim
of equitable estoppel arises where a ‘““party has been
induced to refrain from using such means or taking such




                             13
action as lay in his power, by which [it] might have retrieved
[its] position and saved [it]self from loss””’]; City of Hollister
v. Monterey Ins. Co. (2008) 165 Cal.App.4th 455, 481 [claim
of equitable estoppel sounds in equity].)
       Appellant calls our attention to Civil Code section
2943.1, enacted in 2014 through Assembly Bill No. 1770 to
codify a procedure for closing lines of credit, similar to the
one Citibank West had in place in 2006. The new statute
provides that a lender must close the line of credit and
release the lien on the property upon receipt of a payoff and
written instructions from the borrowers to suspend and close
the line of credit. (Id., § 2943.1, subds. (c)-(d).) Appellant
requsts that we take judicial notice of the legislative history
of this statute, and contends that, before the enactment of
section 2943.1, liens securing lines of credit were
automatically extinguished upon payoff by operation of law.
We grant the request for judicial notice, but disagree with
appellant’s contention.
       The problem presented to the Legislature was that
when an equity line of credit is not shut down by the
borrower during the sale of a property, “the underlying lien
and loan become the debt of the innocent buyer.” (See
Assem. Floor Analysis, Sen. Conc. Amends. to Assem. Bill
No. 1770 (2013–2014 Reg. Sess.) as amended July 1, 2014,
p. 2.) That is because “the lien follows the real property
unless it is extinguished.” (Ibid.) The Legislature intended
to standardize the process for terminating a line of credit so




                                14
that it “will not inadvertently become the liability of the
subsequent homeowner.” (Ibid.)
      The Legislature recognized that the problem was due
to the automated processing of payoff statements and the
lenders’ refusal to close lines of credit without instructions
from the borrowers to do so. Where a property was in the
process of being sold to a new owner or refinanced with a
lender who expected to have a first lien position, the failure
to close an existing line of credit resulted in the new owner
or lender “being subject to an apparent prior lien.” (Sen.
Rules Com., Off. of Sen. Floor Analyses, Analysis of Assem.
Bill No. 1770 (2013–2014 Reg. Sess.), as amended July 1,
2014, p. 5.)
      Nothing in the bill analyses on which appellant relies
suggests that, under the law existing before the enactment
of Civil Code section 2943.1, the lien on a line of credit was
automatically extinguished on payoff by operation of law. To
the contrary, the problem was that the lien continued to
encumber the property, causing problems for subsequent
owners and lenders.
      The priority of liens in that situation is determined not
at law, but in equity, under the doctrine of equitable
subrogation, which admittedly is the gravamen of
appellant’s action. We examine appellant’s request for
declaratory relief regarding the priority of its lien under that
doctrine next.




                               15
   B. Equitable Subrogation
      The doctrine of equitable subrogation implies a right to
recover from the principal debtor when the subrogee pays
the debtor’s obligation to a creditor in order to protect the
subrogee’s own interest. (See generally 13 Witkin, Summary
of Cal. Law (10th ed. 2005) Equity, § 183, pp. 514–515, and
cases cited.) The doctrine most typically applies in
insurance cases but is not limited to that context. (Id.,
§§ 183–185, at pp. 514–519.)
      As applied in the real property context, equitable
subrogation provides an exception to the “first in time, first
in right” system of lien priorities where equity requires a
different result. (JP Morgan Chase Bank, N.A. v. Banc of
America Practice Solutions, Inc., supra, 209 Cal.App.4th at
p. 860; see also Branscomb v. JPMorgan Chase Bank N.A.
(2014) 223 Cal.App.4th 801, 806.) When a lender “‘advances
money to pay off an encumbrance on realty at the instance of
either the owner of the property or the holder of the
encumbrance, either on the express understanding, or under
circumstances from which an understanding will be implied,
that the advance made is to be secured by a first lien on the
property,’” and “‘the new security is for any reason not a first
lien on the property,’” then the lender who holds that
security, “‘if not chargeable with culpable and inexcusable
neglect, will be subrogated to the rights of the prior
encumbrancer under the security held by him, unless the
superior or equal equities of others would be prejudiced
thereby.’” (Simon Newman Co. v. Fink (1928) 206 Cal. 143,




                               16
146.) In short, equitable subrogation allows a lender who
pays off a borrower’s debt to a creditor “‘to succeed to the
rights and remedies of the creditor so paid.’” (Ibid.)
      The right of subrogation is purely derivative: a party
entitled to subrogation has the same rights as an assignee of
the creditor’s claim, must stand in the creditor’s shoes, and
is subject to the same defenses. (Fireman’s Fund Ins. Co. v.
Maryland Cas. Co. (1998) 65 Cal.App.4th 1279, 1292.) A
claim for equitable subrogation is subject to the statute of
limitations that applies to the right to which the claimant is
subrogated. (See, e.g., Valley Crest Landscape Development,
Inc. v. Mission Pools of Escondido, Inc. (2015) 238
Cal.App.4th 468, 481 [equitable subrogation claim based on
contractual indemnity subject to statute of limitations for
breach of written contract].) In other words, “equity will
enforce subrogation only when the action is brought within
the time in which an action could have been brought to
enforce the original obligation to which the right of
subrogation is sought.” (Howell v. Dowling (1942) 52
Cal.App.2d 487, 498.)
      Here, appellant seeks to be subrogated to respondent’s
position of priority by virtue of its payoff of the second line of
credit, which would allow it to assert Citibank West’s right
under the January 31, 2006 deed of trust securing that line
of credit. (See Simon Newman Co. v. Fink, supra, 206 Cal.
at p. 146 [holder of new security who pays off prior creditor
will be subrogated to that creditor’s rights under that
creditor’s security].) Because appellant’s right is derivative,




                                17
it is governed by the statute of limitations that would apply
to respondent’s rights under the January 31, 2006 deed of
trust.
       In the trial court, appellant argued that the equitable
subrogation claim was subject to the statute of limitations in
Civil Code section 882.020, which applies to the right to
proceed under a power of sale in a deed of trust whether or
not enforcement of the debt itself is barred. (Miller v.
Provost (1994) 26 Cal.App.4th 1703, 1708.) Under that
statute, a deed of trust expires 10 years after the maturity
date of the obligation if that date “is ascertainable from the
recorded evidence of indebtedness,” or 60 years after
recordation of the deed, if “the last date fixed for payment of
the debt . . . is not ascertainable from the recorded evidence
of indebtedness.” (Civ. Code, § 882.020, subd. (a)(1) & (2);
Miller, at pp. 1708–1709.)
       Neither party briefed Civil Code section 882.020 on
appeal. When asked to do so, appellant submitted a
supplemental brief, which suggested in part that appellant
had abandoned its reliance on Civil Code section 882.020 in
favor of other arguments. Appellant argued that it did not
seek to “revive” respondent’s lien, which it assumed was
extinguished by operation of law, allowing its own lien to
move into a position of priority. But even were the deed of
trust securing the second line of credit extinguished,
equitable subrogation “‘will set aside a cancellation of such
security, and revive’” it for appellant’s benefit, so long as
“[n]o rights of third persons who might be injured by the




                              18
revival of the first mortgage are involved; and no prejudice to
the creditor [whose security is revived], is shown.” (Simon
Newman Co. v. Fink, supra, 206 Cal. at pp. 146, 148.)
       In other parts of its supplemental brief and at oral
argument, appellant recognized that equitable subrogation
allows it to assert respondent’s rights under respondent’s
security, rather than to assert its own rights under its own
security. Appellant argued that, if it were asserting
respondent’s rights under the second line of credit “to non-
judicially foreclose in second priority lien position,” its claim
for equitable subrogation would be timely under Civil Code
section 882.020 because the deed of trust has a 30-year
mortgage maturity date.
       Whether or not appellant has abandoned its reliance
on Civil Code section 882.020 on appeal, respondent’s
demurrer to the equitable subrogation claim fails as a
matter of law because that claim, on its face, is not subject to
the three-year statute of limitations in section 338.
Respondent’s demurrer was based exclusively on section 338,
subdivisions (a), which applies to actions based upon “a
liability created by statute,” and (d), which applies to actions
“for relief on the ground of fraud or mistake.” But
respondent’s right to proceed against the Limas under the
deed of trust securing the second line of credit, to which
appellant seeks to be subrogated, is not created by statute.
(Brandenburg v. Eureka Redevelopment Agency (2007) 152
Cal.App.4th 1350, 1359.) Nor is respondent (or its
predecessor Citibank West) the alleged victim of fraud or




                               19
mistake as to its own security. Thus, respondent’s right, to
which appellant will be subrogated, is not in the nature of
relief from a statutory violation, fraud or mistake for
purposes of section 338, subdivisions (a) and (d).
       In its supplemental brief, respondent incorrectly
argued that appellant would be subrogated to the Limas’
right to a reconveyance of Citibank West’s deed of trust, or to
the rights of the title insurer. As we have explained,
equitable subrogation would allow appellant to step into
respondent’s shoes and assert respondent’s rights against
the Limas under the deed of trust securing respondent’s
second line of credit. (See Simon Newman Co. v. Fink,
supra, 206 Cal. at p. 146.) Since appellant seeks only a
declaration of its rights, respondent’s alternative argument
that this is not an action to foreclose on a deed of trust is
beside the point. (See Canova v. Trustees of Imperial
Irrigation Dist. Employee Pension Plan (2007) 150
Cal.App.4th 1487, 1497 [“Declaratory relief operates
prospectively to declare future rights, rather than to redress
past wrongs”].)
       At oral argument, for the first time, respondent
asserted that appellant had not stated a valid claim for
equitable subrogation because its allegations do not meet all
elements of that doctrine. Respondent cited Caito v. United
California Bank (1978) 20 Cal.3d 694 (Caito), and we gave
the parties an opportunity to submit additional briefing on
that case. After considering the parties’ additional briefing,
we find that respondent’s belated arguments against the




                              20
merits of appellant’s equitable subrogation claim are not
supported by Caito, and they improperly raise what for the
most part are factual issues that may not be resolved on
demurrer. (See Intengan v. BAC Home Loans Servicing LP
(2013) 214 Cal.App.4th 1047, 1058 [demurrer is not
appropriate vehicle for resolving disputed facts].)
      In Caito, supra, 20 Cal.3d 694, two cotenant families
(the Caitos and the Caponis) cosigned on a bank loan; when
the bank foreclosed, the Caitos asserted priority over a
subsequent lender as to amounts they claimed to have lent
to the Caponis to keep the original loan current. The Caitos
claimed to have signed onto that loan only to accommodate
the Caponis. (Id. at pp. 698–700.) The court declined to
apply the doctrine of equitable subrogation based on an
undisclosed accommodation agreement between the two
cotenant families. (Id. at pp. 702–703.) Although the court
recited all elements of equitable subrogation, its holding
turned on the principle that a codebtor could not be
subrogated to the rights of a creditor since the “debt paid
must be one for which the subrogee was not primarily
liable.” (Id. at pp. 704, 707.) That is not the issue here
because Countrywide was not a codebtor on Citibank West’s
lines of credit.
      Respondent’s argument that Countrywide acted as a
volunteer in refinancing those lines of credit finds no support
in Caito, supra, 20 Cal.3d 694. Under well-established
authority, a bank that refinances a loan at the debtor’s
request and with the understanding that it will receive




                              21
priority is not a volunteer. (See JP Morgan Chase Bank,
N.A. v. Banc of America Practice Solutions, Inc., supra, 209
Cal.App.4th at p. 861; Simon Newman Co. v. Fink, supra,
206 Cal. at pp. 146–147.)
      The argument that Countrywide did not pay off the
Limas’ entire debt raises a factual issue that is beyond the
scope of our review on demurrer. We must deem true
appellant’s allegations that the escrow agent conferred with
both the Limas and Citibank West regarding the correct sum
required to obtain a reconveyance of the 2006 deed of trust
and determined that sum to be less than the amount
included in the March 10, 2006 payoff statement. We also
must deem true the allegation that Citibank West accepted
payment of the lesser amount and reduced the balance on
the second line of credit to zero. That the second line of
credit remained open for lack of a termination letter signed
by the Limas does not defeat appellant’s allegations that the
payment was offered and accepted in full satisfaction of the
Limas’ debt. (See Potter v. Pacific Coast Lumber Co. of Cal.
(1951) 37 Cal.2d 592, 607 [tender of lesser sum offered and
accepted in full satisfaction of debt results in discharge of
debt]; see also California Federal Bank v. Matreyek (1992) 8
Cal.App.4th 125, 134–135 [bank accepted full payment on
loan without prepayment penalty].)
      Respondent relies on Caito, supra, 20 Cal.3d 694 to
argue that Countrywide’s loan resulted from a secret
agreement with the Limas, of which Citibank West had no
notice, and it would be unjust to invoke the doctrine of




                             22
equitable subrogation against respondent. Under the
“doctrine of superior equities,” the right to subrogation may
be invoked against a third party only if that party’s wrongful
conduct makes its equity inferior to the plaintiff’s. (Golden
Eagle Ins. Co. v. First Nationwide Financial Corp. (1994) 26
Cal.App.4th 160, 171; see JP Morgan Chase Bank, N.A. v.
Banc of America Practice Solutions, Inc., supra, 209
Cal.App.4th at p. 862 [subrogee’s equity superior if
intervening lienor has notice of subrogee’s lien].) The
holding of Caito, which was based on the fully litigated facts
of that case, cannot be used on demurrer to resolve what is
essentially a factual dispute about what notice Countrywide
and Citibank West each had of the other lender’s refinancing
of Citibank West’s first line of credit.
      In the first amended complaint, appellant alleged “on
information and belief” that Citibank West knew
Countrywide was refinancing the Limas’ lines of credit with
an expectation of priority. In the second amended
complaint, it clarified that Citibank West must have been on
notice of the refinancing because Countrywide’s escrow
agent was well known in the loan industry as “an escrow
company that handled refinancing of loans.”
      A “‘“[p]laintiff may allege on information and belief any
matters that are not within his personal knowledge, if he has
information leading him to believe that the allegations are
true.”’ [Citation.]” (Gomes v. Countrywide Home Loans, Inc.
(2011) 192 Cal.App.4th 1149, 1158.) On demurrer, we draw
all reasonable inferences in favor of the plaintiff. (Rickley v.




                              23
Goodfriend (2013) 212 Cal.App.4th 1136, 1141–1142.) It is
not unreasonable to infer that receiving payoff requests from
an escrow agent known to handle refinancing transactions
would have placed Citibank West on notice that the Limas
were involved in such a transaction with another lender.
       Respondent argues appellant has not alleged that
Countrywide relied on any wrongful act by Citibank West.
However, both the first and second amended complaint
allege that, in closing escrow on its loan, Countrywide relied
on Citibank West’s payoff statement as to the first line of
credit, which was issued even though that line of credit was
in the process of being refinanced by Citibank West; the first
line of credit was allegedly closed and a second line of credit
opened without further notice to Countrywide. In essence,
appellant has alleged that Countrywide was misled by
Citibank West’s partial disclosure of the payoff amount due
on the first line of credit, absent additional disclosure that
Citibank West was in the process of refinancing that line of
credit.
      In its initial brief on appeal, respondent relied on the
record notice Citibank West’s 2006 deed of trust gave
Countrywide. Respondent argued that the first amended
complaint showed Countrywide had “actual and imputed
knowledge” of Citibank West’s second line of credit and deed
of trust. Respondent also argued that the allegations to the
contrary in the second amended complaint were inconsistent
with those in the first amended complaint and should be
disregarded. In its second supplemental brief, respondent




                              24
does not challenge the allegation in the second amended
complaint that the escrow officer did not inform
Countrywide about Citibank West’s second line of credit
when she learned about it in February 2006.
      Constructive or record notice of an intervening lien is
insufficient to defeat a claim of equitable subrogation under
California law; only actual notice may defeat such a claim.
(See JP Morgan Chase Bank, N.A. v. Banc of America
Practice Solutions, Inc., supra, 209 Cal.App.4th at p. 861.)
The allegations in the first amended complaint show only
that Countrywide acted “through its escrow agent” in paying
off the second line of credit. The agency relationship gives
rise to a presumptive imputation of constructive, but not
actual, notice. (See In re Marriage of Cloney (2001) 91
Cal.App.4th 429, 438–443; see also Han v. United States (9th
Cir. 1991) 944 F.2d 526, 529–530.)
      In the second amended complaint, appellant attempted
to repudiate the agency relationship with the escrow agent.
That attempt may have resulted in an inconsistent, and
legally conclusory, allegation, which we need not accept as
true. (See Holland v. Morse Diesel Internat., Inc., supra, 86
Cal.App.4th at p. 1447 [inconsistent allegations in
subsequent pleadings may be disregarded]; Hill v. Roll
Internat. Corp. (2011) 195 Cal.App.4th 1295, 1300
[contentions, deductions, and conclusions of law need not be
accepted as true].) The allegation also defies logic because
appellant’s equitable subrogation claim is premised on the




                             25
escrow agent’s payoff of the second line of credit on behalf of
Countrywide.
       Whether or not the escrow agent exceeded its authority
in negotiating the payoff of the second line of credit, nothing
in the first or second amended complaint shows that
Countrywide had actual knowledge of that line of credit at
any time before funding its own line of credit at the close of
escrow. (See, e.g., Lawyers Title Ins. Corp. v. Feldsher (1996)
42 Cal.App.4th 41, 54 [examining subrogee’s knowledge and
conduct at close of escrow].) Nor does the allegation in the
first amended complaint that Countrywide paid off the
second line of credit through its escrow agent necessarily
show that the escrow agent was in communication with
Countrywide after the close of escrow. Rather, the
allegations in the first and second amended complaints
consistently show that the additional funds used for the
payoff of Citibank West’s second line of credit came from
loan proceeds already disbursed to the Limas.
       In sum, we disagree with respondent’s contentions that
appellant has either abandoned its claim for declaratory
relief based on equitable subrogation, or failed to state such
a claim on the factual allegations of the second amended
complaint. Nor do we agree that the claim is barred by the
statute of limitations in section 338.2

     2
       Whether the equities would ultimately favor
appellant and the extent of any priority it may be awarded
on the facts of this case are not issues properly before us,
and we express no view about them.



                              26
  C. Equitable Subordination
      Although appellant purported to assert a claim for
declaratory relief based on equitable subordination, it does
not address the elements of that theory on appeal, and the
factual allegations in the two amended complaints do not
state a claim under such a theory.3
      Parker v. Tout (1929) 207 Cal. 590, the only authority
cited in support of the theory of equitable subordination in
the first amended complaint, is a case of “replacement and
modification” of a senior mortgage by the same lender. (See
Rest.3d Property, Mortgages, supra, § 7.3 [where lender
releases and replaces senior mortgage with new mortgage, it
retains priority except to extent material change in terms
prejudices junior lienholder].) In Parker, a bank had retired
its own loan in order to lend an increased amount, unaware
that a mechanic’s lien had been recorded in the meantime.
(Id. at p. 594.) The court held that “the lien of the bank
under its trust deed is superior in right to the mechanic’s




     3
       The doctrine of equitable subordination has been
codified in the Bankruptcy Code. (See 11 U.S.C. § 510(c).)
Appellant cites no authority for applying it outside the
bankruptcy context. (See, e.g., HBE Leasing Corp. v. Frank
(2d Cir. 1995) 48 F.3d 623, 634 [“Equitable subordination is
distinctly a power of federal bankruptcy courts, as courts of
equity, to subordinate the claims of one creditor to those of
others”].)



                              27
lien to the extent of the amount of the original note and
interest thereon.” (Ibid.)
      Subsequent cases have made clear that a material
modification of a senior lien, such as an increase in the
principal or interest rate, does not result in loss of priority
absent contractual subordination. (See Friery v. Sutter
Buttes Sav. Bank (1998) 61Cal.App.4th 869, 877–879.)
Where a seller agrees to subordinate to construction loans, a
material modification of those loans may result in their total
loss of priority. (Gluskin v. Atlantic Savings & Loan Assn.
(1973) 32 Cal. App. 3d 307, 315.) However, in the case of a
subordinating junior lender, only the modification of the
senior lien loses priority. (Lennar Northeast Partners v.
Buice (1996) 49 Cal. App. 4th 1576, 1586–1587.)
      These cases are based on the premise that the junior
lienholder has agreed to be in junior position and should be
protected from modifications in the senior lien to the extent
that those modifications materially increase the risk of
default. (See generally Comment, Subrogation of Mortgages
in California: A Comparison with the Restatement and
Proposals for Change (2001) 48 UCLA L. Rev. 1633, 1646–
1651.) Assuming Citibank West’s refinancing of its first line
of credit with a second line of credit with a higher limit
resulted in replacement and modification, appellant alleges
that Countrywide never agreed to be in a junior position to
Citibank West’s senior lien; rather, it bargained for retiring
that lien completely and taking its priority position. These
allegations do not fit the doctrine of replacement and




                              28
modification; rather, as we have explained, they state a
claim under the doctrine of equitable subrogation.4
                               II
      In the second amended complaint, appellant asserted
causes of action for unjust enrichment, seeking restitution of
the $599,567.65 payoff amount, and for an injunction based
on a theory of constructive fraud, seeking to forestall
foreclosure on the property until respondent subordinates its
lien on the property to appellant’s. In its reply brief on
appeal, appellant maintains that all of its claims are
premised on respondent’s assertion of an apparently
superior lien to the property, to which appellant seeks to
subrogate (or which it seeks to subordinate to its own lien).
      As we have explained, we are not bound by the form of
appellant’s claims or the relief demanded. (Yee v. Cheung,


     4  Even were appellant a bona fide subordinating junior
lienhoder, California replacement and modification cases do
not appear to entitle it, as a hard money lender, to priority
over respondent’s entire lien, but only over the $100,000
limit increase between Citibank West’s first and second lines
of credit. (See Lennar Northeast Partners v. Buice, supra, 49
Cal. App. 4th at p. 1588; Comment, supra, 48 UCLA L. Rev.
at pp. 1647–1648.) In contrast, depending on the equities of
the case, the doctrine of equitable subrogation may allow
appellant to step into respondent’s shoes and assert
respondent’s rights under the deed of trust securing the
second line of credit, at least as to the payoff amount. (See
Simon Newman Co. v. Fink, supra, 206 Cal. at p. 146;
Comment, at p. 1655.)



                              29
supra, 220 Cal.App.4th at p. 194.) We see no basis for
distinguishing the causes of action asserted in the second
amended complaint from the claim for declaratory relief
based on equitable subrogation in the first amended
complaint. In their essence, the claims of unjust enrichment
and constructive fraud are premised on Countrywide’s
refinancing of Citibank West’s line of credit with the
expectation of lien priority, which did not materialize.
      “Unjust enrichment is not a cause of action, . . . or even
a remedy, but rather ‘“‘a general principle, underlying
various legal doctrines and remedies.’” . . . . [Citation.] It is
synonymous with restitution. [Citation.]’ [Citation.]”
(McBride v. Boughton (2004) 123 Cal.App.4th 379, 387.)
Equitable subrogation may be used “‘to enforce restitution in
order to prevent unjust enrichment. . . . [Citation.]’” (Estate
of Kemmerrer (1952) 114 Cal.App.2d 810, 814; see also
Lawyers Title Ins. Corp. v. Feldsher, supra, 42 Cal.App.4th
at p. 53.)
      Citibank West’s alleged nondisclosure of its own
refinancing of the first line of credit and the circumstances
surrounding its failure to close the second line of credit are
issues relevant to the equities of the case. It is doubtful,
however, that they state a separate cause of action for
constructive fraud because constructive fraud is “‘a unique
species of fraud applicable only to a fiduciary or confidential
relationship.’ [Citation.]” (Mark Tanner Construction, Inc. v.
HUB Internat. Insurance Services, Inc. (2014) 224
Cal.App.4th 574, 588.) No such relationship has been




                               30
alleged in this case, nor does it generally arise in arm’s
length dealings between business entities. (See, e.g., City of
Hope Nattional Medical Center v. Genentech, Inc. (2008) 43
Cal.4th 375, 386–392; Recorded Picture Co. v. Nelson
Entertainment, Inc. (1997) 53 Cal.App.4th 350, 370;
Worldvision Enterprises, Inc. v. American Broadcasting Cos.
(1983) 142 Cal.App.3d 589, 595.)
      Besides, were the allegations against Citibank West to
give rise to a separate claim of constructive fraud (or
negligent misrepresentation), such a claim would be barred
by the statute of limitations in section 338, subdivision (d).
(Thomson v. Canyon (2011) 198 Cal.App.4th 594, 607
[applying three-year statute of limitations to claim of
constructive fraud]; Broberg v. The Guardian Life Ins. Co. of
America (2009) 171 Cal.App.4th 912, 920 [applying three-
year statute of limitations to claims of fraud and negligent
misrepresentation]; but see Ventura County Nat. Bank v.
Macker (1996) 49 Cal.App.4th 1528, 1530–1531 [applying
two-year statute of limitations to claim of negligent
misrepresentation].)
      Appellant’s argument that a claim subject to the
statute of limitations in section 338 would not have accrued
until 2011, when respondent asserted its priority, is based
on the assumption that Citibank West’s lien terminated
upon payoff; hence, according to appellant, respondent did
not have priority as a matter of law, and it injured
appellant’s interest only by its misguided claim of priority.
As we have explained, that assumption is incorrect.




                              31
Respondent has legal priority under the “first in time, first
in right” system of lien priorities unless equity requires a
different result. (JP Morgan Chase Bank, N.A. v. Banc of
America Practice Solutions, Inc., supra, 209 Cal.App.4th at
p. 860.)
      Nor does the delayed discovery rule aid appellant with
any claim for fraud subject to section 338. Delayed
discovery, unlike equitable subrogation, is defeated by
presumed or constructive notice. (Nguyen v. Western Digital
Corp. (2014) 229 Cal.App.4th 1522, 1551; see generally 3
Witkin, Cal. Procedure (5th ed. 2008) Actions, § 659, p. 870.)
Appellant relies on Federal Deposit Ins. Corp. v. Dintino
(2008) 167 Cal.App.4th 333, to argue that Countrywide had
no duty to inspect the public records for a reconveyance of
Citibank West’s deed of trust because it had no reason to
suspect Citibank West retained lien priority. The court in
Dintino reasoned that a claim based on the mistaken
recordation of a reconveyance by a bank may not be defeated
solely by the record of reconveyance, where the bank has no
other reason to suspect its mistake. (Id. at p. 352.)
      In contrast, here, appellant’s allegations show that, in
March 2006, Countrywide’s escrow agent learned several
things that would have placed Countrywide on inquiry notice
as to its lien priority: that the Limas had simultaneously
refinanced the same line of credit with two banks, that
Countrywide’s payoff of the first line of credit had been
rejected, and that Citibank West conditioned the closing of
the second line of credit on receiving a signed termination




                             32
letter with the payoff. Because the escrow agent’s
knowledge of these facts is imputed to Countrywide for
purposes of accrual of any independent claim for fraud
against Citibank West, such a claim would be barred under
section 338, subdivision (d).
       We conclude that appellant may proceed on its cause of
action for declaratory relief based on equitable subrogation.
We consider all other theories in the first and second
amended complaint to be variations of that cause of action,
rather than independent causes of action, as they assert no
independent right for which relief may be granted under
California law. (Davies v. Krasna, supra, 14 Cal.3d at
p. 515.) While on the facts of this case the statute of
limitations in section 338 would bar a cause of action subject
to its terms, the claim for equitable subrogation is not
subject to section 338 and is not time-barred.




                              33
                       DISPOSITION
       The judgment is reversed and the matter is remanded
for further proceedings on appellant’s request for declaratory
relief based on equitable subrogation. The parties are to
bear their own costs on appeal.
       CERTIFIED FOR PUBLICATION




                                   EPSTEIN, P. J.
We concur:



     WILLHITE, J.



     COLLINS, J.




                              34