A qualified disposition is avoided only to the extent necessary to satisfy the transferor's debt to the creditor at whose instance the disposition had been avoided, together with such costs, including attorney's fees, as the court may allow. If any qualified disposition is avoided as provided in this section, then:
(1) If the court is satisfied that a qualified person has not acted in bad faith in accepting or administering the property that is the subject of the qualified disposition:(a) Such qualified person has a first and paramount lien against the property that is the subject of the qualified disposition in an amount equal to the entire cost, including attorney's fees, properly incurred by such qualified person in the defense of the action or proceedings to avoid the qualified disposition. It is presumed that such qualified person did not act in bad faith merely by accepting such property; and(b) The qualified disposition is avoided subject to the proper fees, costs, preexisting rights, claims, and interests of such qualified person, and of any predecessor qualified person that has not acted in bad faith; and(2) If the court is satisfied that a beneficiary of a trust has not acted in bad faith, the avoidance of the qualified disposition is subject to the right of such beneficiary to retain any distribution made upon the exercise of a trust power or discretion vested in the qualified person or qualified persons of such trust, which power or discretion was properly exercised prior to the creditor's commencement of an action to avoid the qualified disposition. It is presumed that the beneficiary, including a beneficiary who is also a transferor of the trust, did not act in bad faith merely by creating the trust or by accepting a distribution made in accordance with the terms of the trust.