
469 B.R. 286 (2012)
In re Rita PANZARINO, Debtor.
David E. Grochocinski, Trustee, Plaintiff,
v.
Domenico Panzarino, et al., Defendants.
Bankruptcy No. 10 B 45010. Adversary No. 10 A 02302.
United States Bankruptcy Court, N.D. Illinois, Eastern Division.
March 9, 2012.
*288 Ariane Holtschlag, Grochocinski, Grochocinski & Lloyd, Ltd., Orland Park, IL, for Plaintiff.
Gina Krol, Cohen & Krol, Mitchell Lieberman, Noonan & Lieberman, Ltd., Chicago, IL, Terri M. Long, Law Office of Terri M. Long, Homewood, IL, William C. Elwell, U.S. Department of Justice, Washington, DC, for Defendants.

MEMORANDUM OPINION
CAROL A. DOYLE, Bankruptcy Judge.
The chapter 7 trustee moved for summary judgment on two counts of his complaint against Fremont Investment and Loan, Inc., the lender who refinanced the debtor's mortgage on her home several years before she filed for bankruptcy. Litton Loan is the servicer for the successor to Fremont. The issue presented is whether a chapter 7 trustee can avoid the lien of a mortgage lender who refinanced the debtor's previous mortgage loan but failed to record its lien in the proper county until approximately one month before the debtor filed for bankruptcy. The trustee seeks to avoid the transfer of the lien as a preferential transfer under § 547(b) of the Bankruptcy Code, 11 U.S.C § 547(b). Litton Loan admits most of the elements of a preference but argues that § 547(b) does not apply under two doctrines: earmarking and conventional subrogation. Neither of these doctrines applies in this case to defeat the trustee's claim that the recording of the lien was a preferential transfer that can be avoided under § 547(b).

1. Facts
The relevant facts are uncontested. The debtor, Rita Panzarino, and her husband refinanced the mortgage loan on their residence in 2006. Fremont lent the Panzarinos the funds to pay off the previous mortgage lender, Option One, who had a perfected first priority lien on the property. The refinancing transaction closed on October 24, 2006. Option One was paid off in full with the funds loaned by Fremont. The title agent at the closing was supposed to insure that Fremont held a first lien on the property and was charged with recording Fremont's mortgage. The title agent recorded the mortgage on December 1, 2006 in Lake County instead of DuPage County where the property is located. Option One released its lien on the property on November 27, 2006.
The debtor's husband, Domenico Panzarino, filed a voluntary chapter 7 bankruptcy *289 petition on October 16, 2009. Gina Krol is the chapter 7 trustee in Domenico's case. At the time Domenico filed for bankruptcy, the Fremont mortgage was not recorded in DuPage County.
On July 13, 2010, the IRS filed a Notice of Federal Tax lien against Domenico and Rita Panzarino. On September 8, 2010, the Fremont mortgage was recorded in DuPage County.
Approximately one month later, on October 7, 2010, Rita Panzarino, filed a voluntary chapter 7 petition. David Grochocinski was appointed as trustee in Rita's case and is the plaintiff in this adversary proceeding.

2. The Complaint
The trustee filed this adversary proceeding against Domenico as a co-owner of the property, Gina Krohl as the trustee in Domenico's bankruptcy, Fremont, and the IRS. The amended complaint contains three counts. In Count I, the trustee seeks authority to sell the jointly owned property under § 363(h) and (f) of the Bankruptcy Code, with all liens and interests to attach to the proceeds upon sale. In Count II, he seeks to avoid the Fremont lien as a preferential transfer that occurred within 90 days before the filing of Rita's bankruptcy case. In Count III, the trustee seeks a determination of who has an ownership interest or other claims in the property.
Count I has been resolved by the parties through a motion to sell the property that was granted in Rita's bankruptcy case. The property was sold by the trustee on February 24, 2012 and the funds are to be held in escrow until the remaining issues in this adversary proceeding are resolved.

3. The Motions for Summary Judgment
The trustee moved for summary judgment with respect to Counts II and III. Litton, as servicer to the successor to Fremont, filed a cross-motion for summary judgment. It argues that the Fremont lien is not an avoidable preference under the doctrines of earmarking and conventional subrogation.

4. Standard under § 547(b)
A transfer is avoidable under § 547(b) if it: (1) was made to or for the benefit of a creditor, (2) was made for or on account of an antecedent debt, (3) was made while the debtor was insolvent, (4) was made on or within 90 days before the date of the filing of the petition, and (5) allowed the creditor to receive more than it otherwise would have. 11 U.S.C. § 547(b); Warsco v. Preferred Technical Group, 258 F.3d 557, 564 (7th Cir.2001). Litton admits that all of these elements are met by the trustee except that Litton denies that there was a transfer within the 90-day period under the earmarking and conventional subrogation doctrines. Neither doctrine applies in this case.

5. Earmarking
First, Litton argues that the recording of the Fremont mortgage should not be considered a transfer for purposes of § 547(b) under the earmarking doctrine. The term "transfer" is defined in § 101(54)(A) of the Bankruptcy Code to include the creation of a lien. 11 U.S.C. § 101(54)(A). Litton contends that courts do not apply this language literally when the elements of the earmarking doctrine are met. Under this doctrine, courts hold in certain circumstances that when a third party lends money to the debtor for the specific purpose of paying a selected creditor, the payment to the previous creditor is not an avoidable preference. The creditor must show that the new lender and the debtor agreed to use loaned funds to pay a *290 specific antecedent debt, the terms of that agreement were actually performed and the debt was paid with the new funds, and the transaction does not diminish the debtor's estate. McCuskey v. National Bank of Waterloo (In Re Bohlen Enterprises, Ltd.), 859 F.2d 561, 565-66 (8th Cir.1988).
As the McCuskey court noted, the earmarking doctrine is "entirely a court-made interpretation" of a statutory requirement that a voidable preference must involve a transfer of an interest of a debtor in property. Id. The doctrine was first created to protect a guarantor or other person who was liable on a debt with the debtor. If the trustee could recover the payment made to the original creditor, the guarantor could potentially have to pay the debt twice. Id. The doctrine evolved over time to include payments to creditors of a debtor by a third party (such as a new lender) who was not liable with the debtor on the debt being paid off. Id.
The original rationale for applying the doctrine when a guarantor paid off the debtor's debt was that there was no transfer of property of the debtor (the guarantor's funds were used to pay the debt) and no diminution of the debtor's estate. Id. When the doctrine was expanded to cover a new lender who had no liability on the original debt, courts reasoned that the funds were effectively out of the control of the debtor because the new lender required that the first lender be paid off in full as a condition of making the new loan. Id. In McCuskey, the Eighth Circuit questioned whether the doctrine should be applied to nonguarantors under § 547(b) but held that it need not decide whether the earmarking doctrine should be preserved, limited or even rejected entirely because the elements of earmarking had not been met. Id. at 566.
The Seventh Circuit has recognized the earmarking doctrine but concluded that it did not apply in the context of a check-kiting scheme in which the new lender did not require that a particular creditor be paid off. In re Smith, 966 F.2d 1527, 1533 (7th Cir.1992). The court has not applied the doctrine to a transfer involving a refinance of a mortgage.
The vast majority of courts recognizing the earmarking doctrine have applied it to protect the creditor who was paid off by the new lender from having to return the money to the trustee, not to protect the new lender from the consequences of its failure to properly perfect its lien. Litton seeks to apply the doctrine far beyond its traditional reach to protect the owners of the loan from their failure to properly record the mortgage for almost two years.
Litton cites primarily Kaler v. Community First Nat. Bank (In re Heitkamp), 137 F.3d 1087 (8th Cir.1998), to support its argument. In Heitkamp, the Eighth Circuit cited its previous decision in McCuskey without acknowledging that the McCuskey court never held that earmarking should apply to any party not liable on the original debt. The Heitkamp court applied the doctrine to protect the new lender from its failure to record its security interest until four months after it lent the funds, which was just three days before the debtors filed for bankruptcy. With virtually no analysis and no recognition of the substantial leap it was making from the McCuskey decision and all previous applications of the earmarking doctrine, the Heitkamp court applied the doctrine to relieve the new lender of the consequences of its failure to record its lien. The court simply stated that the mechanics lien claimants who had been paid off by the lender could have perfected their liens after the bankruptcy filing and the lender replaced their security interests. A later decision of the 8th Circuit Bankruptcy Appellate Panel noted *291 the Heitkamp decision represented "a major change in the application of the doctrine in this circuit" but obviously was compelled to follow it. Krigel v. Sterling National Bank (In re Ward), 230 B.R. 115, 119 (8th Cir. BAP 1999).
Many courts have declined to follow Heitkamp. See, e.g., Collins v. Greater Atl. Mortg. Corp. & Mortg. Elec. Registration Sys., Inc. (In re Lazarus), 478 F.3d 12 (1st Cir.2007); Vieira v. Anna Nat'l Bank (In re Messamore), 250 B.R. 913 (Bankr. S.D.Ill.2000). These cases reason that a refinancing involves a number of distinct transfers and that the payment of the proceeds to the old lender cannot be considered the same transaction as creating and recording the new mortgage. Lazarus, 478 F.3d at 15-16 ("Rather, in refinancing there are multiple transactions, including a new loan to the debtor, a mortgage back from the debtor to the new lender, a pre-arranged use of the proceeds of the loan to pay off the old loan and the release of the old mortgage."); Messamore, 250 B.R. at 917 ("The transfer to [the new lender] that occurred upon perfection of its lien was separate and distinct from the transfer that occurred when [the old lender] was paid with borrowed funds, and this transfer was clearly a transfer of the debtors' interest in property, as it depended on the debtors' grant of a security interest to [the new lender]."). The court agrees with the analysis in Messamore and Lazarus that the earmarking doctrine should not be applied to protect the new lender of the consequences of its failure to perfect its lien.
This conclusion is consistent with § 547(e)(2)(A), which provides in effect a grace period for lenders who perfect their liens within 30 days after a transfer is made. Section 547(e)(2)(A) provides that a transfer is deemed to be made at the time of the transfer (i.e., at the time the security interest is granted, in this case at the closing of the Fremont loan in October 2006) if the creditor perfects within 30 days of that date. 11 U.S.C. § 547(e)(2)(A). If the creditor perfects beyond 30 days from the date the security interest is granted, however, the transfer is deemed to take place when the transfer is perfected. 11 U.S.C. § 547(e)(2)(B). Through these provisions, Congress has expressly provided only a 30-day grace period for perfecting security interests to be applied to determine the time of transfer for purposes of claims under § 547. Courts should not expand pre-Code doctrines to extend the grace period for perfecting beyond the 30 days expressly provided by Congress.
For all of these reasons, the court will not apply the doctrine of earmarking to permit the owner of the Fremont loan to avoid the consequences of the failure to perfect the lien prior to the 90-day preference period.

6. Conventional Subrogation
Litton also argues that the doctrine of conventional subrogation applies to protect the Fremont lien from avoidance under § 547(b). Under Illinois law, mortgage liens are governed by the Conveyances Act, 765 ILCS 5/1 et seq., which provides that "[a]ll deeds, mortgages and other instruments of writing which are authorized to be recorded, shall take effect and be in force from and after the time of filing the same for record, and not before, as to all creditors and subsequent purchasers, without notice[.]" 765 ILCS 5/30 (emphasis added). The purpose of this section is to give third parties the opportunity to ascertain the status of title to the property. Aames Capital Corp. v. Interstate Bank of Oak Forest, 315 Ill.App.3d 700, 248 Ill.Dec. 565, 734 N.E.2d 493, 496 (2000). Illinois courts have deviated from *292 this "first in time, first in right" rule through equitable and conventional subrogation. Id. Litton argues that conventional subrogation applies in this case to subrogate it to the lien rights of Option One, which recorded its mortgage long before the preference period.
Illinois courts have applied conventional subrogation to allow a new creditor who pays off a debt owed to a previous creditor to assume that previous creditor's lien position in certain circumstances. The new lender must demonstrate that (1) there is an express agreement that the new lender will be able to assert the rights of the original creditor, (2) the previous debt was in fact paid off by the new lender, (3) no harm will come to an innocent party if priority is granted to the lender, and (4) there has been no gross negligence. Union Planters Bank N.A. v. FT Mortgage Cos., 341 Ill.App.3d 921, 276 Ill. Dec. 465, 794 N.E.2d 360, 364 (2003); Aames Capital, 248 Ill.Dec. 565, 734 N.E.2d at 498. The Illinois Supreme Court recognized this principle in Home Savings Bank of Chicago v. Bierstadt, 168 Ill. 618, 48 N.E. 161 (1897), when it allowed a lender who paid off a first mortgage to prevail over a party who recorded its lien between the time the first mortgage was recorded and the new lender recorded its lien. The court reasoned that the party who was in the second position had notice of the original mortgage and would be in no worse position if the new lender was subrogated to the rights of the original lender. Bierstadt, 168 Ill. at 624, 48 N.E. 161.
The doctrine has been applied by Illinois courts to modern refinance transactions to allow a lender who refinances an earlier mortgage to have priority over a lien recorded after the original lender's mortgage was recorded but before the new lender recorded its own mortgage. Union Planters, 276 Ill.Dec. 465, 794 N.E.2d at 365; Aames Capital, 248 Ill.Dec. 565, 734 N.E.2d at 499. The Aames Capital court discussed the application of conventional subrogation to modern refinance transactions. It stated that "[w]e are persuaded by Aames's argument that the holding in Bierstadt should be resurrected to determine when conventional subrogation should apply to a case involving a mortgage refinancing." 248 Ill.Dec. 565, 734 N.E.2d at 500.
The Aames Capital court imposed some limits, however, on the application of conventional subrogation in these circumstances. It held that a "refinancing mortgagee that records its mortgage lien" is entitled to be subrogated to the original lien and its corresponding priority position up to the amount of the original mortgage secured at the time of its perfection. Id. (emphasis added). Thus, the doctrine does not apply unless the new lender records its lien. The court further held that "[t]he doctrine of conventional subrogation will apply if the original mortgage lien is in full force and effect at the time the refinancing mortgage lien is recorded." Id., 248 Ill. Dec. 565, 734 N.E.2d at 501 (emphasis added). The doctrine does not apply when the original lien has been released before the new mortgage is recorded. The Aames Capital court also made it clear that the purpose of the doctrine is to allow the new lender to have priority over intervening lien holders. Id.
Conventional subrogation does not apply in this case for several reasons. First, Option One released its lien in November 2006 after it was paid off, long before the Fremont mortgage was recorded in DuPage County. Under Aames Capital, therefore, Fremont cannot step into Option One's previous priority position because that lien was released before Fremont recorded. The court recognizes that *293 the Bierstadt court allowed the new lender to step into the priority of the original lender even though that original lender had released its lien before the new lender recorded its lien. More recent cases such at Aames Capital, however, reflect Illinois law as it applies specifically to modern mortgage refinancing. Litton would not prevail in any event because of the other reasons discussed below.
Second, under Aames Capital, the new lender cannot be subrogated to the rights of the original lender unless and until the new lender records its own mortgage. Thus, the seminal act that creates the lien and provides priority to the new lender is the recording of the new mortgage. Fremont did not acquire any lien rights in the property until it recorded in September 2010. The transfer of the Fremont lien occurred for purposes of § 547(b) when the lien was created on the date of recording. Conventional subrogation does not change this analysis to somehow make the date the Option One mortgage was recorded the date of the transfer of the Fremont lien for purposes of § 547. The doctrine would merely allow Litton to assert the lien priority of Option One against intervening lienholders if all the elements of the doctrine were met. Conventional subrogation thus has no impact on the analysis under § 547(b) of when the transfer of the lien occurred.
Finally, the doctrine of conventional subrogation is an equitable doctrine that allows one lien holder to assert priority over a lien holder who recorded before the new loan was made. The doctrine was created to allow equity to be done in favor of parties who contractually agreed that the new lender would step into the priority of the original lender in disputes between the new lien holder and any intervening lien holders. It has no application when there is no dispute with an intervening lien holder who would otherwise trump the lien rights of the new lender. Instead, the Conveyances Act provision that all mortgages shall take effect from the time of filing and not before applies. 765 ILCS 5/30. Thus, while Illinois law applies to define the property rights of parties in bankruptcy, the doctrine of conventional subrogation does not apply in the circumstances of this case. Instead, the Fremont lien is subject to avoidance because the lien was created by the recording of the mortgage in 2008 that was a transfer within the preference period for purposes of § 547(b).

Conclusion
The trustee has established the elements of a preferential transfer under § 547(b) with respect to the recording of the Fremont mortgage on September 8, 2010. The court will therefore enter a judgment order regarding Count II avoiding the Fremont lien. The court will also enter a judgment under Count III stating that the Fremont lien is invalid.
