Except in the case of amounts attributable to (and not in excess of) deductions allowed under section
213 (relating to medical, etc., expenses) for any prior taxable year, gross income does not include amounts referred to in subsection (a) if such amounts are paid, directly or indirectly, to the taxpayer to reimburse the taxpayer for expenses incurred by him for the medical care (as defined in section 213(d)) of the taxpayer, his spouse, and his dependents (as defined in section
152, determined without regard to subsections (b)(1), (b)(2), and (d)(1)(B) thereof). Any child to whom section
152
(e) applies shall be treated as a dependent of both parents for purposes of this subsection.