and inserting “ reduction .— (1) In general For purposes , and (2) by adding at the end the following new paragraph: (2) Exception for affordable housing properties Paragraph (1) shall not apply to any property with respect to which a credit is allowed under section 42. . (c) Energy credit Paragraph (3) of section 50(c) of the Internal Revenue Code of 1986 is amended— (1) by striking and at the end of subparagraph (A), (2) by striking the period at the end of subparagraph (B) and inserting , and , and (3) by adding at the end the following new subparagraph: (C) paragraph (1) shall not apply to any property with respect to which a credit is allowed under section 42. . (d) Effective date The amendments made by this section shall apply to property placed in service after December 31, 2016. 312. Restriction of planned foreclosures (a) In general Subclause (I) of section 42(h)(6)(E)(i) of the Internal Revenue Code of 1986 is amended to read as follows: (I) on the 61st day after the taxpayer (or a successor in interest) provides notice to the housing credit agency that the building has been acquired by foreclosure (or instrument in lieu of foreclosure) and that the taxpayer intends the termination of such period, unless the housing credit agency determines that such acquisition is part of an arrangement with the taxpayer a purpose of which is to terminate such period, or . (b) Conforming amendment The second sentence of clause (i) of section 42(h)(6)(E) of the Internal Revenue Code of 1986 is amended by striking Subclause (II) and inserting Subclauses (I) and (II) . (c) Effective date The amendments made by this section shall apply to acquisitions by foreclosure (or instrument in lieu of foreclosure) after December 31, 2017. 313. Increase of population cap for difficult development areas (a) In general Subclause (II) of section 42(d)(5)(B)(iii) of the Internal Revenue Code of 1986 is amended by striking 20 percent and inserting 30 percent . (b) Effective date The amendment made by this section shall apply to