any taxable year if such interest was so held by such person during any 3 taxable years preceding such taxable year, and (III) paragraph (5)(B) shall not apply. (ii) Closely related persons For purposes of clause (i)(I), a person shall be treated as closely related to another person if, taking into account the rules of section 267(c), the relationship between such persons is described in— (I) paragraph (1) or (9) of section 267(b), or (II) section 267(b)(4), but solely in the case of a trust with respect to which each current beneficiary is the grantor or a person whose relationship to the grantor is described in paragraph (1) or (9) of section 267(b). (D) Antiabuse rules The Secretary may issue regulations or other guidance which prevent the avoidance of the purposes of subparagraph (A), including regulations or other guidance which treat convertible and contingent debt (and other debt having the attributes of equity) as a capital interest in the partnership. (E) Controlled groups of entities (i) In general In the case of a controlled group of entities, if an interest in the partnership received in exchange for a contribution to the capital of the partnership by any member of such controlled group would (in the hands of such member) constitute property held in connection with a trade or business, then any interest in such partnership held by any member of such group shall be treated for purposes of subparagraph (A) as constituting (in the hands of such member) property held in connection with a trade or business. (ii) Controlled group of entities For purposes of clause (i), the term controlled group of entities means a controlled group of corporations as defined in section 1563(a)(1), applied without regard to subsections (a)(4) and (b)(2) of section 1563. A partnership or any other entity (other than a corporation) shall be treated as a member of a controlled group of entities if such entity is controlled (within the meaning of section 954(d)(3)) by members of such group (including any entity treated as a