The lien of any such taxes shall not re-attach against, and the county treasurer shall have no right to sell for such taxes, any real estate transferred to any purchaser during the time when the lien of any such taxes was lost; nor shall the lien of any such taxes or the right to sell the real estate for such taxes impair or affect the priority of any mortgage, lien, or other encumbrance, which gained priority during the time when the lien for such taxes was lost.
72 P.S. § 5971y