A person indebted to a credit union may, when proceeded against for the collection of such indebtedness or for the enforcement of any security therefor, set off or recoup the amount of a deposit or shares in such credit union held and owned by him at the time of the commencement of such proceeding; provided, however, that if a proceeding in equity has been commenced to restrain the credit union from doing its actual business or if possession of such credit union has been taken over by the commissioner as provided in section twenty-two of chapter one hundred and sixty-seven or as otherwise provided by law, no shares or a deposit shall be so set off or recouped by any such person unless held and owned by him on the date of the commencement of such proceeding or of possession so taken, and the right of set off or recoupment shall be determined as of such date whether the indebtedness of the depositor or shareholder or the shares or the deposit, is then due or payable or becomes due or payable at a later date. Any indebtedness against which shares or a deposit is permitted to be set off or recouped as aforesaid may be secured or unsecured. Section three of chapter two hundred and thirty-two shall not apply to a set off hereunder, except that any party to a joint account may set off the joint deposit against his individual debt to such credit union. Notwithstanding the foregoing, a judgment shall not be rendered against such credit union in favor of the defendant for any balance found due from it if a proceeding in equity has been commenced against the credit union or possession thereof has been taken as aforesaid. The word "deposit", as used in this section, shall include interest due thereon and the word "shares", shall include dividends thereon.
Mass. Gen. Laws ch. 171, § 48