A transfer of real or personal property by a party in interest to a plan shall be treated as a sale or exchange if the property is subject to a mortgage or similar lien which the plan assumes or if it is subject to a mortgage or similar lien which a party-in-interest placed on the property within the 10-year period ending on the date of the transfer.