When a part of the property only is ordered to be sold, if there is an estate for life or for years in an undivided share of the property, the whole of such estate may be set off in any part of the property not ordered sold.