An estate vested in a person merely by way of mortgage or trust shall not escheat by reason of the mortgagee or trustee dying without heirs but any equitable title to or interest in lands shall escheat or be forfeited in the same manner as it would if the person having the equitable had the legal title.