If in proceedings for wrongful interference against a person (the "improver") who has improved the goods, it is shown that the improver acted in the mistaken but honest belief that he had a good title to them, an allowance shall be made for the extent to which, at the time as at which the goods fall to be valued in assessing damages, the value of the goods is attributable to the improvement.
If in a case within subsection (2) the person purporting to sell the goods acted in good faith, then in proceedings by the purchaser for recovery of the purchase price because of failure of consideration, or in any other proceedings founded on that failure of consideration, an allowance shall, where appropriate, be made on the principle set out in subsection (1).
This section applies, with the necessary modifications, to a purported bailment or other disposition of goods as it applies to a purported sale of goods.