If any mortgagee procures a waiver of the landlord's lien, in part or in full, he or she shall recite it in his or her mortgage. If the waiver of lien is not recited in the mortgage, or attached thereto, the waiver shall be invalid against any subsequent mortgagee, purchaser, or assignee.