In the case of ^an anomalous mortgage], the rights and liabilities of the parties shall be determined by their contract as evidenced in the mortgage-deed, and so far as such contract does not extend, by local usage. ...