598. For the purposes of this Title, except section 577,(a) any person or partnership having a right under a contract or otherwise, either immediately or in the future and either absolutely or contingently, to shares of the capital stock of a corporation or interests in a partnership, is deemed to own those shares or interests, if it can reasonably be considered that the principal purpose for the existence of the right is to permit any person to avoid, reduce or defer the payment of tax or any other amount that would otherwise be payable under this Act; and
(b) where a person or partnership acquires or disposes of shares of the capital stock of a corporation or interests in a partnership, either directly or indirectly, and it can reasonably be considered that the principal purpose for the acquisition or disposition of the shares or interests is to permit a person to avoid, reduce or defer the payment of tax or any other amount that would otherwise be payable under this Act, those shares or interests are deemed not to have been acquired or disposed of, as the case may be, and not to have been issued if the corporation or partnership had not issued them immediately prior to the acquisition.