The provisions of this section do not apply when the order of sale directs the sale of any lands which must be sold subject to any existing mortgage, judgment, or other lien, but only when such lands are sold freed and discharged from all such liens.