When the estate of any tenant for life or years, in any undivided part of the property in question, shall have been admitted by the parties, or ascertained by the court to be existing at the time of the order of sale, and the person entitled to such estate shall have been made a party to the suit, such estate may be first set off out of any part of the property, and a sale made of such parcel, subject to the prior unsold estate of such tenant therein; but if in the judgment of the court, a due regard to the interest of all the parties require that such estate be also sold, the sale may be so ordered.