plan which modifies the closed class or the allocations, benefits, rights, and features provided to such closed class does not discriminate significantly in favor of highly compensated employees, and (iv) the class was closed before April 5, 2017, or the defined benefit plan under clause (i) is described in paragraph (1)(C) (as applied for purposes of paragraph (1)(B)(iii)(IV)). (B) Aggregation with plans including matching contributions (i) In general With respect to 1 or more defined contribution plans described in subparagraph (A), for purposes of determining compliance with subsection (a)(4) and section 410(b), the portion of such plans which provides make-whole contributions or other nonelective contributions may be aggregated and tested on a benefits basis with the portion of 1 or more other defined contribution plans which— (I) provides matching contributions (as defined in subsection (m)(4)(A)), (II) provides annuity contracts described in section 403(b) which are purchased with matching contributions or nonelective contributions, or (III) consists of an employee stock ownership plan (within the meaning of section 4975(e)(7)) or a tax credit employee stock ownership plan (within the meaning of section 409(a)). (ii) Special rules for matching contributions Rules similar to the rules of paragraph (1)(B)(ii) shall apply for purposes of clause (i). (C) Special rules for testing defined contribution plan features providing matching contributions to certain older, longer service participants In the case of a defined contribution plan which provides benefits, rights, or features to a closed class of participants whose accruals under a defined benefit plan have been reduced or eliminated, the plan shall not fail to satisfy the requirements of subsection (a)(4) solely by reason of the composition of the closed class or the benefits, rights, or features provided to such closed class if the defined contribution plan and defined benefit plan otherwise meet the requirements of subparagraph (A) but for the fact that