The receipt of assets or assumption of liabilities by the consolidated bank, the exchange of stock, equities, or other ownership interests, and any other transaction carried out in accomplishing the merger of the banks for cooperatives shall not be treated as a taxable event under the laws of the United States or of any State or political subdivision thereof. The preceding sentence shall also apply to the receipt of assets and liabilities by a cooperative to the extent that the net amount of the distribution is immediately reinvested in stock of a consolidated bank (and in such case the basis of such stock shall be appropriately reduced by the amount of gain not recognized by reason of this sentence).