(a) In all cases of mutual debts or mutual credits between the insurer and another person in connection with any action or proceeding under this chapter, such credits and debts shall be set off and the balance only shall be allowed or paid, except as provided in subsection (b) of this section.
(b) No offset shall be allowed in favor of any such person where (1) the obligation of the insurer to such person would not at the date of the entry of any liquidation order, or otherwise, as provided in section 1275 of this title, entitle him to share as a claimant in the assets of the insurer, or (2) the obligation of the insurer to such person was purchased by or transferred to such person with a view of its being used as an offset, or (3) the obligation of such person is to pay an assessment levied against the members of a mutual insurer, or is to pay a balance upon a subscription to the capital stock of a stock insurer.