If the owner of two or more properties mortgages them to one person and then mortgages one or more of the properties to another person, the subsequent mortgagee is, in the absence of a contract to the contrary, entitled to have the prior mortgage-debt satisfied out of the property or properties not mortgaged to him, so far as the same will exten...