Where a lien mentioned in section 2A:56-15 of this title is on the undivided interest or estate of a party, the lien, if partition of the real estate is made, shall thereafter be a charge only on the share assigned to such party, but such share shall be charged first with its just proportion of the costs of the proceedings in partition, in preference to any such lien.
N.J.S. § 2A:56-16