
    Argued and submitted February 17, 1998,
    affirmed on appeal and cross-appeal April 14,
    petition for review denied August 3, 1999 (329 Or 287)
    J. Richard KERR, Respondent - Cross-Appellant, v. Glenn D. MILLER, State of Oregon Department of Revenue and State of Oregon Employment Division, Defendants, and Roy N. STREETER and Patricia A. Streeter, husband and wife, Appellants - Cross-Respondents.
    
    (9404-02447; CA A92500)
    977 P2d 438
    
      Leslie M. Roberts argued the cause for appellants-cross-respondents. With her on the briefs was Josselson, Potter & Roberts.
    Edward S. McGlone III, argued the cause for respondent-cross-appellant. With him on the briefs was Wallace & Klor, P.C.
    Before De Muniz, Presiding Judge, and Haselton and Linder, Judges.
    LINDER, J.
   LINDER, J.

This case involves actions for foreclosure and unjust enrichment, with counterclaims for a declaration of redemption rights and an accounting. Defendants appeal, raising nine assignments of error. Plaintiff cross-appeals, raising two assignments of error. The central issues on appeal relate to the parties’ foreclosure, redemption, and restitution rights. With respect to those equitable claims, we review the facts de novo. ORS 19.125. Our review otherwise is for errors of law and abuse of discretion. We affirm on appeal and cross-appeal.

The north Portland property at issue consists of two lots, Lot 3 and Lot 4, with a small house on each. In December 1986, Kerr sold the property to Glenn Miller. Kerr and Miller discussed and drafted contracts for sale but ultimately accomplished the sale by trust deeds. Miller initially signed promissory notes for each lot. Kerr and Miller later executed two trust deeds, one for each lot (Miller trust deeds), with Miller agreeing to pay Kerr a total of approximately $8,600, plus interest, due on December 29, 1996. As part of their agreement, Miller also assumed the payments on and obligations of a trust deed, on which Equitable Savings and Loan Association was the beneficiary (Equitable trust deed).

Miller fell behind on his payments on the Equitable trust deed in 1988 but then made up the deficiency. He again fell behind in 1991, at which point Equitable initiated a foreclosure action. Nonetheless, Miller for a second time managed to bring the accounts current, and Equitable halted the foreclosure action. In 1992, Miller for a third time stopped making payments on the Equitable trust deed. Several months after that default, Kerr learned that Equitable was nearing foreclosure. To protect his interest in the property, Kerr paid the outstanding debt on the Equitable trust deed, which totaled over $10,000. He then took steps to foreclose his interest and to restore his title. Working through his attorney, Kerr declared Miller in default and put Miller on notice that he would exercise the forfeiture remedy in the contract unless Miller reimbursed him. After receiving Kerr’s notice of default, Miller, either personally or via his attorney, contacted Kerr’s attorney. Miller explained that he could not pay the amount owed and that he was prepared to forfeit his interest and let Kerr take the property back. Miller then provided Kerr’s attorney with information on the tenants occupying the houses, because he considered the property to belong to Kerr and thought Kerr should be the one to deal with the property and the tenants. On March 10,1993, Kerr recorded a declaration of forfeiture of the land sale contracts, mistakenly believing that his sale to Miller had been secured by land sale contracts and could be foreclosed in that manner.

After the recordation, Kerr took possession of the property and determined that the rental houses on the lots had deteriorated severely. He decided to repair and improve the houses on the lots and sell each of them. To facilitate repairs, he had the tenants vacate the properties. In June 1993, Kerr arranged for Carl Miller, a personal friend and construction manager (no relation of Glenn Miller), to begin work on the houses. Kerr also agreed to sell Lot 3 to Carl Miller’s daughter at a reduced price in exchange for his labor in repairing the units. Work began on Lot 4. After completing improvements and repairs on Lot 4, Kerr put that house on the market and received several offers immediately. He accepted a bid for $57,000, which was $2,000 over the listed price. On September 16,1993, Kerr conducted a preliminary title search in preparation for the sale. The title search revealed that Miller still held title to the property. Because the property was secured by trust deeds, rather than contracts for sale as he mistakenly thought, Kerr’s declaration of forfeiture the previous March had been ineffective. Kerr needed to foreclose the Miller trust deeds through judicial or nonjudicial foreclosure to remove the cloud on the title. Consequently, he could not sell Lot 4 until that was done.

Meanwhile, Kerr had also begun repairs and improvements on Lot 3. Based on their dealings, Kerr believed that Miller would not assert his interest in the two lots. Relying on that belief, Kerr continued to make improvements on Lot 3 and prepared to foreclose on the trust deeds by nonjudicial sale. Most of the improvements to Lot 3 were completed by November 1, 1993, when the notice of foreclosure sale was advertised. Foreclosure sales were scheduled for February 23,1994, (Lot 4) and for March 10,1994, (Lot 3).

After publication of the notice of foreclosure sale, Glenn Miller advised Kerr that he was filing for bankruptcy. Miller offered to deed the property to Kerr in lieu of foreclosure, but Kerr declined because, by then, tax liens had been placed on the property and Kerr did not want to assume Miller’s tax liabilities. After Miller filed for bankruptcy on January 27,1994, an automatic stay prohibited any transfers of interest. Miller cooperated with Kerr in petitioning the bankruptcy court for relief from the automatic stay so that Kerr could go forward with foreclosure. The bankruptcy court granted that relief on February 22, 1994. However, because of the complications caused by the bankruptcy stay, the foreclosure sales were canceled and later rescheduled to March 28,1994.

Patricia and Roy Streeter (the Streeters) became interested in the property at about that time. The Streeters purchase and repair distressed properties to sell for a profit. Patricia Streeter read the November 1, 1993, notice of foreclosure and drove by the homes to view them. Streeter is a real estate agent and closely watches foreclosure notices in an effort to find investment opportunities. She remembered the property from 1991, when she had driven past the houses following Equitable’s earlier foreclosure notice. She realized the houses were in considerably better condition than they had been two years before. About two weeks prior to the scheduled February 23 sale, she contacted Kerr’s attorney and inquired about the total debt owed on the property and the amount necessary to cure the default. Kerr’s attorney was unable to give her the total sum due, explaining that substantial repairs had been made and that he had not received a final total for the repair costs.

Streeter next checked the county records for the amounts owing on the Equitable trust deed and discovered that Glenn Miller was in bankruptcy. Believing that the sale was imminent, Streeter went to Miller’s home at 8:00 p.m. on February 22, the night before the sale originally was to take place for Lot 4. Miller was not home, but Streeter left a note explaining that she knew the property was about to be foreclosed and that she wanted to buy his interest. In offering to buy Miller’s interest, Streeter hoped to acquire Miller’s status, including the ability to cure the default and prevent the sale. The note asked Miller to call her. Miller did, at 11:30 p.m. that same night. Miller, in exchange for only $250 for each lot, told Streeter that he would be “happy” to accept her offer. Miller and Streeter therefore met first thing in the morning on February 23 and executed a bargain and sale deed for each lot, with Streeter assuming “all terms and conditions” of the Miller trust deeds.

Streeter immediately recorded the bargain and sale deeds and, that same morning, informed Kerr’s attorney that she had purchased Miller’s interest in the property and that she wanted to cure the default prior to the sale. Kerr’s attorney again informed Streeter that he still did not know the total cost figure for the improvements and repairs. He also advised Streeter that he questioned the validity of her deeds in light of the bankruptcy proceeding. He promptly investigated the validity of the deeds and was told, first by Chicago Title Insurance Company and then by an Oregon attorney with expertise in bankruptcy law, that the Streeters’ deeds were invalid. Later, on February 23, Streeter delivered to Kerr’s attorney copies of the deeds and presented payment for sums owing on the trust deeds, interest and charges on principal sums, and attorney fees. In tendering that sum, Streeter by letter made it clear that her offer was to pay only those sums; she offered nothing for the repairs or improvements to the property. By a later letter, Streeter again specified that she would pay on the defaulted debts and related costs and fees; she showed no willingness to pay for repairs and improvements. Also, in that second letter, she suggested that any rents collected by Kerr may have to be offset against the amount owed.

Kerr’s attorney felt that Miller’s last-minute sale to the Streeters put Kerr in a “pickle.” Kerr’s attorney could not determine the validity or invalidity of Streeters’ deeds with certainty. He therefore concluded that “[p]robably the only thing we [could] do to protect everyone’s rights, including those of Ms'. Streeter, was to dismiss the non-judicial foreclosure proceedings and seek a court opinion, a judicial opinion, as to the validity of the deeds.” Through his attorney, Kerr canceled the nonjudicial sale that had been rescheduled for March 28 and pursued judicial foreclosure.

In his complaint, Kerr pleaded that Miller was the owner of the property and asserted several bases for foreclosure, including Miller’s failures: to protect, preserve, and maintain the property in good condition; to pay taxes, assessments, and liens on the property; to provide insurance on the property; to appear and defend the property against foreclosure; and to obtain prior written consent before conveying his interest to Streeter. Kerr also separately alleged a claim for unjust enrichment based on his repairs and improvements. The Streeters, pleading that they had purchased the property from Miller and were its owners, resisted the foreclosure. They counterclaimed for a declaration of their right to redemption based on an amount that did not include repairs and improvements. They also counterclaimed for a declaration of their right to an accounting, seeking to offset the reasonable rental value of the two properties against the redemption amount.

After pretrial rulings disposing of some of the issues (i.e., whether the Streeters have title to the properties), the parties tried the foreclosure, redemption, unjust enrichment, and accounting issues to the court. The trial court, in a lengthy written order that has been of considerable assistance to us in our review, exhaustively examined the issues and set out its legal conclusions and factual findings. The trial court resolved the various claims and counterclaims by concluding that: (1) Kerr is entitled to foreclose and recover the amounts he paid on Miller’s default; (2) the Streeters’ tender was inadequate and did not cut off Kerr’s right to foreclose; (3) because Kerr at all times acted in good faith, he is entitled to reimbursement for the value of the repairs and improvements he made; (4) the Streeters are entitled to redeem; and (5) the Streeters are entitled to an offset for rents as of the date on which they became the property owners.

The trial court entered judgments declaring the Streeters the owners of the property and granting Kerr foreclosure on the amounts Miller owed to Kerr and the amounts Kerr paid on Miller’s behalf to cover his default on the Equitable trust deed. In the same judgments, the trial court also granted the Streeters a right to redeem and granted Kerr a right to recover for repairs and improvements made to the property, contingent on the Streeters’ exercise of their right to redeem. The trial court determined that the reasonable value of the repairs and improvements to both lots totaled $43,835.75 and included that sum in the total amount due. The court therefore granted a writ of execution to Kerr for $50,627 on Lot 4 and $49,881 on Lot 3. The Streeters were awarded the right to redeem in those amounts.

The pivotal issue in this case is Kerr’s claim for unjust enrichment, in which he seeks restitution for repairs and improvements made to the houses on both lots. It is pivotal because, as the Streeters recognize, their argument that Kerr was not entitled to foreclose depends largely on whether he wrongly refused their tender, which in turn depends on whether Kerr was entitled to reimbursement for repairs and improvements. We therefore begin with an analysis of the Streeters’ assignments of error relating to Kerr’s legal entitlement to restitution for unjust enrichment.

A trust deed seeming the sale of property is deemed a mortgage. ORS 86.715. With respect to mortgages, Oregon is a “hen theory” state, meaning that a mortgage on real estate does not convey legal or equitable title or interest to the holder of the mortgage (mortgagee). Instead, the mortgagee has only a lien on the property. ORS 86.010; Land Associates v. Becker, 294 Or 308, 312, 656 P2d 927 (1982). As a result, if the debtor (the mortgagor) defaults on the obligations secured by the mortgage (e.g., payments on the debt or insuring and maintaining the property), the mortgagee does not gain an immediate right of possession but must instead first foreclose the secured interest. See ORS 86.010. Until foreclosure, the mortgagee lawfully may take possession only if the mortgagor voluntarily relinquishes possession.

Here, although Miller legally did not have to relinquish possession of the property to Kerr when Miller could no longer meet his obligations on the debts, he voluntarily choose to do so. Kerr then acquired the status of a “mortgagee in possession.” The question is whether Kerr, as a mortgagee in possession, made repairs and improvements at his peril or whether he is entitled to compensation for them if the owner (here, the Streeters) wants to cure the default, regain possession, and keep the benefits of the improvements.

The parties disagree, first and foremost, about the legal principles to be applied in determining Kerr’s basic entitlement to restitution. At the core of that disagreement are fundamentally different views of the latitude available to a court to achieve an equitable resolution between the parties. The Streeters contend that equity permits restitution to one who voluntarily improves another’s property only in narrowly prescribed circumstances, ones that do not fit Kerr’s situation. Kerr, on the other hand, urges that the applicable principles are flexible and permit a court to serve equity as the circumstances may warrant. Although the pertinent legal principles are not unbounded, we agree with Kerr that a court’s equitable authority is broad and was properly exercised by the trial court in this case.

The common-law rule was that, when a mortgagee took possession, he or she was limited to making only necessary repairs and could not demand reimbursement for improvements. See Jensen v. Probert, 174 Or 143, 149-50, 148 P2d 248 (1944) (describing and charting development of the rule). Early on, however, courts sitting in equity freed themselves of the rule’s restraints, approaching the issue with flexibility and frequently adjusting the rule based on the equities of particular circumstances. See generally Grant S. Nelson & Dale A.Whitman, Real Estate Finance Law § 4.29 (3d ed 1993). Oregon courts, likewise, have been guided by principles of equity, rather than by a strict or narrow formulation of when an improver may seek restitution. See Jensen, 174 Or at 160 (“Equity is not bound by the harsh rule of the common law which would give the improvements to the owner without any right of reimbursement to the occupier.”); Cooley v. Fredinburg, 146 Or App 436, 446, 934 P2d 505 (1997) (“[restitution is an equitable remedy, and its scope is dependent on the specific circumstances of each case”).

In adopting a flexible approach to ensure that equity is served, rather than frustrated, Oregon has often found itself adopting more liberalized — and sometimes minority-positions in this area. For example, Oregon regards restitution for improvements to be a basis for an independent action for unjust enrichment, where a majority of jurisdictions appear to permit such a claim for restitution to be made only in response to an owner’s effort to invoke equitable, rather than legal, remedies against the occupier. Comer v. Roberts, 252 Or 189, 191-93, 448 P2d 543 (1968); see also Coos County v. State of Oregon, 303 Or 173, 195, 734 P2d 1348 (1987) (recognizing Oregon’s reendorsement of the minority rule that good faith improver is entitled to restitution even when true owner has not sought aid of equity). Similarly, Oregon cases have extended the availability of restitution to occupiers who made improvements without any “color of title”; who incorrectly believed themselves to hold a long-term lease interest and not an ownership interest; and who were aware that they did not own the property improved but made improvements under circumstances that nevertheless would render it unfair to permit the owner to retain the improvements without compensation. Comer, 252 Or at 193 (color of title — i.e., an actual but defective conveyance — not necessary); McKay v. Horseshoe Lake Hop Harv., 260 Or 612, 614, 491 P2d 1180 (1971) (restitution for mistaken belief that occupier had 99-year leasehold interest); Atkinson v. Morrissy, 3 Or 332, 337 (1871) (restitution to occupier where owner reluctantly consented to improvements); Roesch v. Wachter, 48 Or App 893, 899, 618 P2d 448 (1980) (restitution to improver who mistakenly believed he had a contract right to later buy the property). In each instance, our decisions have extended the availability of restitution beyond its more traditional boundaries because those limitations were artificial and irrelevant to the equity of the occupier’s situation. See, e.g., Comer, 252 Or at 191-93.

Thus, the touchstone of Oregon’s jurisprudence in this area consistently has been whether, given the equities involved, a denial of restitution would work an excessively harsh result on the occupier or would give an unjust windfall to the owner. See generally Cooley, 146 Or App at 445-47. To seek the aid of equity, the essential requirement is that the improver must act in good faith. Beyond that, whether an improver will actually prevail and be awarded restitution requires an assessment of the equities as a whole, which depends on the circumstances of the particular case. See McKay, 260 Or at 614; Comer, 252 Or at 190-93; Cooley, 146 Or App at 446.

The Streeters, however, insist that the availability of restitution is more narrowly confined in this context. They argue first that restitution is not available because it is not enough that an occupier act in good faith in making improvements. Rather, citing the Restatement of Restitution § 42(1) (1937), they contend that an occupier’s belief that he or she owns the property must be objectively “reasonable.” Under that approach, restitution is defeated, irrespective of other equities, if occupiers are careless or insufficiently diligent in concluding that the property is their own or, at least, theirs to improve.

The Streeters’ position is directly at odds with Sugarman v. Olsen, 254 Or 385, 459 P2d 545 (1969). There, the plaintiffs advised the defendant that they owned the land on which he was about to build, and the defendant built on it anyway. The plaintiffs urged that the defendant should be barred from restitution because he improved the property without determining the validity of his title. Id. at 389. The Supreme Court rejected that argument, clarifying that the improvements had to be made in good faith, not with diligence and prudence:

“ ‘That the appellants were most unwise in undertaking so large an expense without first obtaining a clear definition of their rights, no one can deny; but imprudence is not the equivalent of bad faith.’ ”

Id. at 390 (quoting Bradley v. Cornwall, 203 Md 28, 39, 98 A2d 280 (1952)).

Later decisions have not altered the focus on the improver’s subjective good faith. At most, Oregon’s cases have considered an improver’s negligence, carelessness, or imprudence as it bears on the other equities between the parties. Thus, if the improver acts in good faith, but negligently, while the owner was not negligent or otherwise at fault, restitution may be denied. Comer, 252 Or at 193. If, however, both parties are negligent, or if neither party is, the equities in that regard are equal and restitution is awarded. Id. In short, the improver’s good faith provides a basis on which the improver may seek restitution. The improver’s and owner’s relative negligence bears on the analysis only in the assessment of whether, considering the equities as a whole, the improver in fact should prevail.

The Streeters also argue that the only relevant evidence of good faith is a belief in actual ownership, as opposed to some other significant connection with the property. Were we to agree, that conclusion would preclude restitution for the improvements Kerr made after the title search on Lot 4 revealed that Miller continued to own the two lots. However, we find no basis, equitable or precedential, to conclude that Oregon’s law is or should be so constrained. Prior Oregon decisions, in fact, point in the opposite direction. In one of the earliest relevant cases, an occupier was awarded restitution for improvements where he knew he did not have title, but the owner had reluctantly consented to the improvements. Atkinson, 3 Or at 337. We reached a similar result in Roesch. There, the improver knew that he did not own the property that he improved but believed in good faith that he had a future right to buy the property. His belief was wrong because the parties’ negotiations had never matured to that point. Despite his knowledge that he did not own the property, we held that his expectation of future ownership was a sufficient basis for an award of restitution. Roesch, 48 Or App at 899. Those precedents refute the Streeters’ contention that, as a matter of law, if an improver does not have a good faith belief in actual ownership, equity closes its doors to the improver’s claim for unjust enrichment.

We turn, then, to our assessment of the equities in this case. When Kerr took possession of the property and began repairs and improvements to the homes in anticipation of selling each lot, he acted under a good faith belief of ownership, even though, in reality, he was merely a mortgagee in possession. Kerr initially believed, albeit mistakenly, that the sale to Miller had been secured by contracts of sale. Kerr therefore attempted to foreclose his interest through a declaration of forfeiture, which would have been proper had he been correct. See ORS 93.905-ORS 93.915 (procedure for declaring a forfeiture of vendee’s interest in a land sales contract); Ochs v. Albin, 137 Or App 213, 220, 903 P2d 906 (1995). Until Kerr learned from the title search on Lot 4 that Miller still held the title to the property, Kerr honestly believed that he owned both lots. That belief, at worst, was based on an innocent mistake.

The equities of the situation are not altered meaningfully by the fact that the title search gave Kerr actual notice that Miller, not Kerr, was the lawful owner of the property. Miller still was expressing no interest in curing his default. Moreover, at that point, he was facing bankruptcy, a fact that made it all but certain that he could not cure even had he wanted to do so. By cooperating with Kerr to obtain a lift of the bankruptcy stay and by showing no interest in redeeming, Miller continued to signal to Kerr that he would not interfere with Kerr’s exercise of his right to foreclose. Thus, although Kerr knew that Miller retained title to the property, Kerr nevertheless had every reason to believe that, to use Kerr’s words, Miller wanted only to “wash his hands” of the property and was turning it permanently over to Kerr. When Kerr continued and completed the repairs and improvements to the second lot (Lot 3), he did so without a belief that he owned the property but believing in good faith that Miller had no intent to redeem and that Kerr therefore would readily be able to perfect his interest by foreclosing. That good faith expectation is a basis on which he may properly seek restitution. See Roesch, 48 Or App at 897-98 (good faith expectation of right to buy property in the future); Nelson & Whitman, Real Estate Finance Law § 4.29 at 229 (an improver who takes property believing in good faith that the “redemption interest was barred or would never be exercised — a belief to which the mortgagor’s conduct usually contributes” — will be entitled to restitution for unjust enrichment).

In assessing the equities as between Kerr and Miller, the trial court concluded:

“Kerr and Glenn Miller were both mistaken about the 1986 transaction, believing it to have been a land sale contract. Miller was in default and unable to meet his obligations to Kerr so Kerr took legal steps to obtain title to the property with Miller’s cooperation and consent. These legal steps were flawed because of the mutual mistake made by Kerr and Miller.
“On [February 22,1994], the night before the scheduled foreclosure sale, Miller was somehow persuaded to transfer his interest to the Streeters. At that point, Miller acted contrary to his previous statements on which Kerr had relied, so the equities are with Kerr.”

Our review is de novo, but we concur fully in the trial court’s assessment, although we are inclined to state the point more strongly. Miller reassured Kerr — if not by word, then at least by cooperation and inaction — that he did not intend to assert any interest in the property and would not prevent Kerr’s possession and foreclosure. When Miller changed his position by selling his interest to the Streeters, his conduct amounted to bad faith. The equities at that point not only favor Kerr, but they favor him decidedly.

The trial court similarly found that the equities between Kerr and the Streeters favored Kerr. Again, we agree fully with the trial court:

“Defendant Streeter was fully aware of the legal background of the properties. Most importantly, she was aware at the time of the Miller/Streeter transaction that there were substantial improvements made to the two properties. She is now claiming a right of redemption, the same right which Miller represented to Kerr he was unable or unwilling to exercise, the representations on which Kerr relied in completing the work on the second property.”

The equities between Kerr and Miller are basis enough to award restitution to Kerr. The equities between Kerr and the Streeters, however, reinforce our assessment. Even before the Streeters purchased the properties, Streeter was well aware that Kerr had made improvements and that he expected compensation for them if the Streeters wanted to redeem. She also knew that Miller was in serious financial distress. When Streeter approached Miller on the eve of the foreclosure sale, offering him minimal value for his interest, she was clearly seeking to take advantage of the situation. For the $500 she invested, she had little to lose and much to gain if, as she undoubtedly hoped, she could exercise Miller’s redemption rights and obtain the benefit of Kerr’s improvements for free. In doing so, she was taking — and assuming— a risk. We decline to conclude that equity should aid her in her gamble and favor her over Kerr in these circumstances. See Cooley, 146 Or App at 446 (where the parties’ rights are uncertain and neither party has sought a legal determination, restitution should be awarded where improvements were made in good faith).

The Streeters have two quarrels with the trial court’s (and now our) assessment of the equities. First, they argue that the “relevant comparison in equities should be between Kerr, who seeks restitution, and the Streeters, the owners of the property from whom restitution is sought.” We decline their invitation to disregard the equities of the situation throughout the time period in which the improvements were being made. Miller owned the property when Kerr took possession and undertook repairs and improvements. Miller was the person in the position to redeem, to indicate to Kerr that he might redeem, or to object to Kerr’s activities. The Streeters did not enter the picture until after Kerr’s repairs and improvements had been completed. The Streeters have never claimed that their transaction with Miller gave them the status of bona fide purchasers. See Nelson v. Hughes, 290 Or 653, 663-66, 625 P2d 643 (1981) (burden of proof as to subsequent bona fide purchaser status lies with the purchaser and must be pleaded as an affirmative defense). Consequently, the Streeters took Miller’s interest subject to Kerr’s equitable claim for unjust enrichment and subject to Miller’s equitable position. See Conley v. Henderson, 158 Or 309, 325, 75 P2d 746 (1938) (innocent purchaser for value, who had no notice of owner’s redemption rights, took free of those rights).

The Streeters’ second contention is that, to the extent we weigh the equities between Kerr and the Streeters, we may consider only whether the Streeters “were at all culpable in creating Kerr’s predicament.” The settled law is to the contrary. In faithfulness to the familiar principle that one who seeks equity must do equity, a court is not limited to examining only the conduct that directly produces the right upon which a party sues — here, Kerr’s right to restitution based on his good faith but mistaken belief of his ownership and Miller’s acquiescence in his foreclosure rights. See North Pacific Lumber Co. v. Oliver, 286 Or 639, 657, 596 P2d 931 (1979) (discussing the scope of the “clean hands” doctrine). The test is only whether a party’s conduct bears some relationship to the transaction in question. Id. As the Supreme Court has cautioned, a court’s concern properly “is with the totality of the relationship as well as its beginnings.” Id. Accordingly, we reject the Streeters’ argument that we are limited to considering their role in “creating Kerr’s predicament,” as opposed to their role in attempting to complicate his predicament by encouraging Miller’s .change in conduct and otherwise taking advantage of Kerr’s unsuccessfid initial foreclosure.

In sum, considering Kerr’s good faith and the equities as a whole, we agree with the trial court’s conclusion that Kerr is entitled to restitution under these circumstances. That leaves, however, the question of the proper amount of that restitution. The Streeters argue that the trial court applied the wrong legal measure and made various erroneous evidentiary rulings, rendering Kerr’s proof inadequate for any award whatsoever.

There is no hard and fast measure of the appropriate amount of restitution to be awarded in cases like this one. Just as equity is not bound by the “harsh rule” of common law that would give the improvements to the owner without any right of reimbursement, “neither is it bound by any rule of thumb as to the manner in which restitution should be made.” Jensen, 174 Or at 160. The general measure of restitution for improvements is the amount of the enhanced value of the property, or the actual and reasonable cost of the improvements, whichever is less. Comer, 252 Or 193-94; Nelson & Whitman, Real Estate Finance Law § 4.29 at 229. That measure applies, however, where the equities between the parties are equal — that is, where the owner is not guilty of inequitable conduct. Comer, 252 Or at 193-94; Coos County, 303 Or at 195-96. Although no Oregon case previously has had occasion to consider the question, we hold that when a mortgagee in good faith has improved property in reliance on the mortgagor’s inequitable conduct (here, explicit or implicit representations that he will not exercise his right to redeem, with a last minute change in that position), the better measure is the greater of the reasonable costs or increased market value. George E. Palmer, 2 The Law of Restitution § 10.9(e), 453-54 (1978). To prevent the owner’s unjust enrichment, the owner not only should have to make the improver whole but also should disgorge the profits of the improver’s efforts.

Under either standard, however, the Streeters can claim no prejudice. The record establishes that before Kerr began repairs and improvements, the assessed value of each lot was somewhere in the $30,000s. Because of the poor condition of the homes, Kerr believed it would be difficult to get that amount for either lot. After the improvements, Kerr received an offer of $57,000 for Lot 4, which was comparable in its condition to the improved condition of Lot 3. Based on that evidence, which is properly a part of the record, the trial court found that the increased market value of the property was approximately $25,000 per lot ($50,000 total), a figure that, on de novo review, we agree the evidence amply supports.

The trial court, however, did not award Kerr an amount based on the property’s increased market value ($50,000). Instead, the trial court awarded “the reasonable value of repairs and improvements in the amount of $43,835.75,” a figure that the record demonstrates reflects the costs of the improvements and repairs. That figure was drawn from testimony and documentary evidence supplied by Carl Miller, who did the work on the two lots. The Streeters raise multiple allegations of error relating to the trial court’s receipt of and reliance on Miller’s testimony and the exhibits, none of which, we conclude, has merit, and none of which warrants discussion. As importantly, however, even, if the Streeters were correct in those challenges, they were not harmed by the trial court’s reliance on Carl Miller’s testimony. An independent expert was called to provide an opinion as to the reasonable costs of the repairs and improvements. His testimony and documentation, which the Streeters do not challenge on appeal, placed the reasonable value of the repairs and improvements at $46,636. Thus, the Streeters got the benefit of a lower restitution amount than the trial court could have awarded on this record. The Streeters therefore cannot claim any prejudice, either by the standard the trial court used to measure the restitution or the evidence the trial court relied on in determining the dollar amount. See OEC 103 (evidentiary error not presumed prejudicial); Baker v. English, 324 Or 585, 590, 932 P2d 57 (1997) (appellate court lacks authority to modify a judgment based on evidential error absent a determination that the error was “prejudicial”).

Some of the Streeters’ assignments of error relate to the accounting or offset awarded in the judgment. We understand their claims to distill to two main points. First, they argue that the trial court erroneously concluded that their second counterclaim was “rendered moot” by the judgment of foreclosure. The Streeters’ second counterclaim sought an accounting for reasonable rentals received by plaintiff from the time he took possession from Miller. Without labeling it an “accounting,” the trial court awarded defendants an offset of the amount due upon redemption for reasonable rentals received by Kerr after the Streeters purchased title from Miller. Regardless of how the trial court phrased it, the Streeters’ counterclaim was considered and was partially granted. Again, they have no basis to complain.

Second, the Streeters contend that the offset should be dated from the time that Kerr took possession in March 1993, instead of from the time that the Streeters obtained their interest in February 1994. As a general rule, a mortgagee in possession must account to the owner for reasonable rents received. Miller et ux v. Engelson et ux, 225 Or 300, 302-03, 358 P2d 276 (1960). Again, there is no hard and fast rule as to the amount of rents that a court will consider reasonably due. The test is whether, under the circumstances, the mortgagee in possession exercised reasonable diligence and prudence. Id. at 303. As one authority observes, the standard permits some flexibility based on the equities involved. Nelson & Whitman, Real Estate Finance Law § 4.28 at 223-24. In particular, occupancy by someone who in good faith believes he or she owns the property provides a basis for adjusting the normal obligation to account for rents:

“Where the mortgagee has entered believing that it is owner and not mortgagee, although in fact the latter is its status, mortgagee will be charged only with the rents actually received. The reason is the obvious unfairness of holding a person to a standard of responsibility based upon a conscious occupation of the property of another when no knowledge of the situation on which the liability is founded exists.”

Id. at 224. Oregon has followed the same approach, determining the rents due based on what is reasonable to expect under the particular circumstances involved. See, e.g., Murray v. Willey et al, 180 Or 257, 272-74, 176 P2d 243 (1947) (no rents due during a time that the legal rights and obligations of the parties were in dispute and occupier believed in good faith that there was no obligation to manage the property for the other party’s benefit).

Our conclusion about the Streeters’ entitlement to rents, therefore, is driven by the same considerations that earlier led us to conclude that Kerr should be entitled to restitution for improvements. Throughout much of the relevant time, Kerr in good faith believed that he owned the property. Once Kerr and Miller both knew that Miller still held title to the property, Miller continued to assist Kerr in pursuing foreclosure and to show no interest in redemption. As importantly, Miller unequivocally had turned the property over to Kerr and had left him to deal with the tenants. The clear import of Miller’s conduct was that any rents were Kerr’s to collect and keep, and the property was his to manage as he chose. The first Kerr knew of a possible change in Miller’s position was when the Streeters, on the date they purchased Miller’s interest, surprised Kerr with their assertion of ownership and their intent to redeem. Under those circumstances, and given Miller’s bad faith, we can find no equity in requiring Kerr to account for any rents before the date of the Streeters’ ownership. The trial court’s award struck the proper balance, given the circumstances, and we adopt it.

The Streeters also take issue with the trial court’s conclusion that Kerr had a right to foreclose. To place their arguments in context, we first begin with a brief description of the foreclosure and redemption rights generally.

Trust deeds are instruments “made to secure the performance of an obligation of a grantor.” ORS 86.710. Upon breach of the obligation secured, the beneficiary may choose between two methods of foreclosure: (1) nonjudicial disclosure, which involves advertisement and sale of the property; or (2) judicial foreclosure, which involves following the procedures available to foreclose mortgages on real property. See generally ORS 86.710. The chosen method of foreclosure dictates the availability and procedure for cure or redemption. When a mortgagee forecloses by advertisement and sale, the defaulting party has the right to cure the default or defaults “any time prior to five days before the date last set for the sale.” ORS 86.753(1). To cure, the mortgagor must tender payment for any default on the debt secured by the trust deed and must tender performance for any obligation that requires particular acts to be done. See ORS 86.753(1). If the trust deed is foreclosed judicially, the defaulting party has the right to redeem the property by paying the entire debt declared due under the trust deed. Moreover, redemption exists in two different forms, equitable and statutory. Equitable redemption, codified at ORS 88.100, exists only until the foreclosure sale. Land Associates, 294 Or at 312-13; Federal Home Mortgage Corp. v. Bauer, 151 Or App 591, 599, 950 P2d 399 (1997), rev den 327 Or 621 (1998). Statutory redemption is available after the foreclosure sale and permits the defaulting party to redeem the property from the purchaser at the sale within 180 days of the date of the sale. ORS 23.560; Land Associates, 294 Or at 312-13.

There is no question here that Miller failed in his payment obligations and was in default. As a result, Kerr was entitled to pursue foreclosure, which he did initially through advertisement and sale (nonjudicial foreclosure). The Streeters, however, contend that Kerr’s foreclosure right was cut off because they tendered a proper amount to cure the default and Kerr wrongly refused that tender. Their position appears to acknowledge that if Kerr is entitled to restitution for repairs and improvements — as we have concluded he is — then the refusal of the tender was not wrongful, because the amount of the tender was inadequate.

We agree that Kerr was entitled to reject the tender, but we disagree that whether he could do so depends only on our after-the-fact determination that he is entitled to restitution. The standard for whether a tender must be accepted should not depend on 20-20 hindsight. That is, the mortgagee should not have to predict correctly what amount a court may later determine should have been tendered. Equity is generally a two-way street and should be in this regard. Just as making an adequate tender is excused where the amount owed is uncertain, unliquidated, or in dispute, the acceptance of the tender should likewise be excused. See Wilson v. Crimmins, 172 Or 616, 621-22, 143 P2d 665 (1943) (where parties disputed amounts of rents to be offset against redemption amount, tender was not necessary). Kerr was entitled to refuse the tender, not only because he was, in fact, entitled to restitution, but also because the amount due was unliquidated and in dispute, as was the Streeters’ title. Parties confronted with significant uncertainties about their respective rights and obligations should be encouraged to obtain a judicial resolution, not punished for doing so. See generally Barclaysamerican / Financial, Inc. v. Boone, 95 Or App 347, 349, 768 P2d 439, on recons 96 Or App 635, 773 P2d 1338 (1989) (even though a mortgagee commences a nonjudicial foreclosure, he or she remains free to abandon that remedy and seek judicial foreclosure). Moreover, when the Streeters approached Kerr to confront him with their title and demand redemption, Kerr became aware for the first time that Miller had breached the obligation in the trust deed to obtain Kerr’s consent prior to any sale of the property. That breach occurred after the original notices of default were sent and, on that ground as well, Kerr was entitled to pursue judicial foreclosure. See Benj. Franklin Federal Savings v. Parker, 87 Or App 64, 67, 741 P2d 512, rev den 304 Or 311 (1987) (plaintiff was entitled to foreclose because payment did not cure breach of obligation to obtain consent prior to transferring interest).

Finally, we address the assignments of error on the cross-appeal. Kerr argues, first, that the trial court erred in failing to conclude that the Streeters are judicially estopped from asserting an offset for rents and from resisting Kerr’s claim for restitution for repairs and improvement. Below, Kerr argued to the trial court that the Streeters had made an appearance in the bankruptcy proceeding and, in the course of that appearance, had taken a position about the value of the property that is inconsistent with their position now. In light of our conclusion that Kerr is entitled to restitution and that the Streeters are not entitled to rents before the date they bought the property from Miller, it does not appear to us that Kerr’s arguments in this regard matter. Even if they do, however, we have reviewed the Streeters’ submissions to the bankruptcy court and do not find a sufficient inconsistency to warrant application of judicial estoppel. See Hampton Tree Farms, Inc. v. Jewett, 320 Or 599, 611, 892 P2d 683 (1995) (requiring, as one of three elements for judicial estoppel, inconsistent positions in a prior judicial proceeding).

In his second assignment of error on cross-appeal, Kerr argues that the trial court erred in granting partial summary judgment to the Streeters on the ground that the conveyance from Miller to the Streeters gave them legal title. That argument depends on the effect of the bankruptcy proceedings on Miller’s ability to sell the property to the Streeters. Kerr made the same contentions to the bankruptcy court and sought to have the bankruptcy court void the sale. The bankruptcy court rejected Kerr’s arguments. Because the substance of Kerr’s attack on the Streeters’ title depends on principles of bankruptcy law, we decline, as did the trial court, to revisit the bankruptcy court’s ruling. See AFSD v. Northland Ins. Co., 139 Or App 92, 100, 911 P2d 942, rev den 323 Or 483, cert den 117 S Ct 492, 136 L Ed 2d 384 (1996) (federal court determination of party’s entitlement to recoupment of Medicaid funds binding as a matter of state/federal comity).

We have considered the other issues raised on appeal and reject them without further discussion.

Affirmed on appeal and cross-appeal. 
      
       Among other problems, the carpets and the flooring were rotting due to plumbing that leaked in both the bathrooms and the kitchen areas. The carpet smelled. The floor was unstable. The kitchen cabinets were in poor condition and could not support weight. In one home, someone had fired hundreds of BBs into the walls. Interior doors were broken or had holes in them. One of the front doors had been kicked in. In late March, one of the houses was inspected by the Housing Authority of Portland and was terminated from participation in the Section 8 housing program because its condition fell below habitability standards due to disintegrating carpeting, deteriorating cabinets, and rotting walls and flooring.
     
      
       Although both Patricia and Roy Streeter were parties to the transactions, Patricia Streeter was the more active participant. We refer to “Streeter” in the singular when we describe Patricia Streeter’s activities.
     
      
       The parties dispute the amount of the tender (i.e., one cheek for $45,000 or two checks totaling $55,000) and whether Streeter was offering to cure the default on one or both lots at that juncture. The conflict in the testimony on those points is not important to our resolution of the case.
     
      
      
         We note our appreciation in this case, in part, because the trial court’s thoughtful and thorough 18 pages of factual findings and legal conclusions represent a commitment of time and resources that, given the demands on trial courts, can be difficult to devote to a written order in an individual case. We also do so because appellants at several points level strong criticisms at the trial court’s findings and conclusions (labeling them, inter alia, “capricious” and “idiosyncratic”). We wish to make clear that those criticisms are wholly unwarranted.
     
      
       Woven into the Streeters’ arguments is a possible contention that the trial court erroneously awarded restitution because, earlier in the proceedings, it had granted their ORCP 54 B motion for failure to state a claim for unjust enrichment. The trial court later reversed itself, concluding that its ruling had been premature. The Streeters do not assign error to that ruling, and it is less than clear whether they intend it as an independent procedural basis for challenging the award of restitution. To the extent they do, it is not properly presented, and we do not reach it.
     
      
       The rule existed as a protection for a mortgagor’s right of redemption by preventing a mortgagee from making improvements chargeable to the mortgagor and, effectively, improving the property to the point that it would become prohibitively expensive to redeem. See Caro v. Wollenberg, 83 Or 311, 318, 163 P 94 (1917) (describing the same policy for the common-law rule); Grant S. Nelson & Dale A. Whitman, Real Estate Finance Law § 4.29,226-27 (3d ed 1993) (same).
     
      
       That section provides:
      “Except to the extent that the rule is changed by statute, a person who, in the mistaken belief that he or a third person on whose account he acts is the owner, has caused improvements to be made upon the land of another, is not thereby entitled to restitution from the owner for the value of such improvements; but if his mistake was a reasonable one, the owner is entitled to obtain judgment in an equitable proceeding or in an action of trespass or other action for the mesne profits only on condition that he makes restitution to the extent that the land has been increased in value by such improvements, or for the value of the labor and materials employed in making such improvements, whichever is least.”
      (Emphasis added.)
     
      
      
        Suburban Properties, Inc. v. Hanson, 234 Or 356, 382 P2d 90 (1963) is not to the contrary, despite the Streeters’ assertion that it is. The Oregon Supreme Court in that case held only that the defendant was not estopped from claiming rights under the original contract even though he stood by while the plaintiff built a house on the disputed property. Id. at 367. As to the improver’s entitlement to restitution in that circumstance, the court expressly declined to reach the question:
      “Whether in future litigation, should there be any, arising out of the erection of a structure by one person on another’s land (see Jensen v. Probert, 174 Or 143, 148 P2d 248 (1948)), defendant’s seeming acquiescence in the face of knowledge of what was going on would be a relevant factor, is a question not now pertinent and concerning which we neither express nor intimate an opinion.”
      
      
        Id. (emphasis added).
     
      
       We are unwilling, despite the Streeters’ insistence, to view Kerr as negligent in failing to investigate whether his sale to Miller was secured by trust deeds, rather than contracts of sale. At a minimum, the mistake as to whether Kerr had foreclosed his interest was mutual, leaving Kerr and Miller in equitable positions that are largely equal. And, in all events, as we conclude later in our discussion, the equities shifted to favor Kerr when Miller sold his interest to the Streeters, conduct that amounted to bad faith.
     
      
       As Professor Palmer states:
      “The reasons for limiting restitution to the increased value of the land, or to the improver’s cost if that is less, do not apply when the landowner stands by and knowingly permits the mistaken improvement to be made. In that case restitution will be measured by the fair market value of the labor and materials.”
     
      
       To measure restitution only by the lesser of costs or market value where the owner acts in bad faith would lead to particularly pernicious results. An owner in Miller’s position could, as Miller did, lead a mortgagee in possession to believe that he did not intend to exercise his right to redeem. The owner could then sit by and watch as the mortgagee, anticipating that he would reap the benefit of his work, devoted personal time, effort, and money to improve the property so that it might command a higher rent or be saleable at a greater profit than it otherwise would have. The net effect of awarding restitution in the lesser of the two amounts — costs or market value — would be to award the profits of the occupier’s good faith efforts to an owner who in bad faith took advantage of the occupier’s belief that he was doing the work for himself or herself.
     
      
       The Streeters urge that the trial court erred in overruling their objection to Kerr’s qualifications to express an opinion as to market value. That issue is not preserved. After the Streeters objected, the court permitted Kerr’s counsel to ask further questions to establish the necessary foundation, which counsel did. After the additional foundation was laid, Kerr testified to his opinions without renewal of the objection. In all events, the objection would not preclude evidence of the county’s assessed value or the amount of the offer that Kerr received on Lot 4. That evidence, in fact, was received without objection.
     
      
       The amount awarded by the trial court is actually about $2,000 less than the exhibits support. The trial court apparently disallowed that amount because it related to expenses incurred specially to prepare the house on Lot 3 for Miller’s daughter’s occupancy and represented an expense that would not have been incurred otherwise. The Streeters, not surprisingly, do not complain about receiving the benefit of that discount.
     
      
       We reject out of hand the Streeters’ argument that the circumstances here are analogous to those in Mendez v. Rosenbaum, 62 Or App 825, 662 P2d 751 (1983). Kerr’s refusal of the tender can hardly be said to have been designed to frustrate the Streeters’ rights when he abandoned the nonjudicial foreclosure proceeding so that he could seek judicial resolution of the parties’ rights and responsibilities.
     