(a) A person who brings a suit to enforce the lien, or a person having a lien, who is made a party to the action, may demand that the lien be enforced against the whole or a part of the property upon which the person performs labor or for which the person furnishes material.
(b) Where there are several lien claims against the same property or partly against the same property and partly against separate property, and it appears to the court that the property that may legally be held for the claims is insufficient to satisfy all the claims, the court shall, as nearly as practicable, determine what particular item of the property subject to the lien is the product in whole or in part of the labor or material furnished by each of the several claimants and for which each claims a lien, and shall give preference accordingly.