of any policy of insurance covering liability arising from services performed as a director, officer, or employee of a corporation or as a partner or employee of a partnership, the person performing such services and the entity for which such services are performed shall be treated as related persons. (7) Regulations The Secretary shall prescribe such regulations as may be necessary to carry out the purposes of this subsection, including— (A) regulations preventing the avoidance of this subsection through cross insurance arrangements or otherwise, and (B) regulations which may provide that a person will not be treated as a United States shareholder under paragraph (1) with respect to any foreign corporation if neither such person (nor any related person to such person) is (directly or indirectly) insured under any policy of insurance or reinsurance issued by such foreign corporation. (b) Election by Foreign Insurance Company To Be Treated as Domestic Corporation (1) In general If— (A) a foreign corporation is a controlled foreign corporation (as defined in section 957(a) by substituting 25 percent or more for more than 50 percent and by using the definition of United States shareholder under subsection (a)(1)(B)), (B) such foreign corporation would qualify under part I or II of subchapter L for the taxable year if it were a domestic corporation, (C) such foreign corporation meets such requirements as the Secretary shall prescribe to ensure that the taxes imposed by this chapter on such foreign corporation are paid, and (D) such foreign corporation makes an election to have this paragraph apply and waives all benefits to such corporation granted by the United States under any treaty, for purposes of this title, such corporation shall be treated as a domestic corporation. (2) Period during which election is in effect (A) In general Except as provided in subparagraph (B), an election under paragraph (1) shall apply to the taxable year for which made and all subsequent taxable years unless revoked with the consent