In the case of any investment made by an association in a real estate loan where the ownership of the real estate security or any part thereof later becomes vested in a person other than the party or parties originally executing the security instruments, unless there is an agreement in writing to the contrary, an association may, without notice to such party or parties, deal with such successor or successors in interest with reference to said mortgage and the debt thereby secured in the same manner as with such party or parties, and may forbear to sue or may extend time for payment of or otherwise modify the terms of the debt secured thereby, without discharging or in any way affecting the liability of such original party or parties thereunder or upon the debt thereby secured.