Subsection (a) shall not apply to a transfer to a trust by a United States person to the extent that any person is treated as the owner of such trust under section 671.
If a trust which is not a foreign trust becomes a foreign trust, such trust shall be treated for purposes of this section as having transferred, immediately before becoming a foreign trust, all of its assets to a foreign trust.