(a) “Accessions” means goods when they are installed in or affixed to other goods.
(b) The interest of a lessor or a lessee under a lease contract entered into before the goods became accessions is superior to all interests in the whole except as stated in (d) of this section.
(c) The interest of a lessor or a lessee under a lease contract entered into at the time or after the goods became accessions is superior to all subsequently acquired interests in the whole except as stated in (d) of this section but is subordinate to interests in the whole existing at the time the lease contract was made unless the holders of those interests in the whole have in writing consented to the lease or disclaimed an interest in the goods as part of the whole.
(d) The interest of a lessor or a lessee under a lease contract described in (b) or (c) of this section is subordinate to the interest of
(1) a buyer in ordinary course of business or a lessee in ordinary course of business of an interest in the whole acquired after the goods became accessions; or
(2) a creditor with a security interest in the whole perfected before the lease contract was made to the extent that the creditor makes subsequent advances without knowledge of the lease contract.
(e) When under (b) or (c), and (d) of this section, and subject to (f) of this section, a lessor or a lessee of accessions holds an interest that is superior to all interests in the whole, the lessor or the lessee may remove the goods from the whole, free and clear of all interests in the whole, but the lessor or lessee must reimburse a holder of an interest in the whole who is not the lessee and who has not otherwise agreed, for the cost of repair of physical injury but not for a diminution in value of the whole caused by the absence of the goods removed or by a necessity for replacing them. A person entitled to reimbursement may refuse permission to remove until the party seeking removal gives adequate security for the performance of this obligation.
(f) The lessor or the lessee may remove the goods under (e) of this section
(1) on default, expiration, termination, or cancellation of the lease contract by the other party but subject to the provisions of the lease contract and this chapter; or
(2) if necessary to enforce other rights and remedies of the lessor or lessee under this chapter.