Sec. 3. A person who:
(1) purchases a mortgaged premises or any part of a mortgaged premises under the court's judgment or decree at a judicial sale or who claims title to the mortgaged premises under the judgment or decree; and
(2) buys the mortgaged premises or any part of the mortgaged premises without actual notice of an assignment that is not of record;
holds the premises free and discharged of the lien.