(a) The lien does not affect an encumbrance that attached to land or a leasehold before the lien's inception.
(b) The lien on material, machinery, supplies, or a specific improvement takes priority over an earlier encumbrance on the land or leasehold on which the material, machinery, supplies, or improvement is placed or located.