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