as making the payment referred to in subsection (a) only to the extent of the proportionate share of such partnership or S corporation as is owned by persons who would be treated as making such payment if the property were owned or used by such persons, and (3) the return required to be made by such partnership or S corporation under section 6031 or 6037 (as the case may be) shall be treated as a return of tax for purposes of subsection (a). (d) Coordination with production credits In the case of any eligible coal refuse facility with respect to which an election is made under subsection (a) or (b), no credit shall be determined under section 45 with respect to such facility for the taxable year in which such election is made. (e) Eligible coal refuse facility The term eligible coal refuse facility means a facility eligible for a credit during the taxable year pursuant to section 45(d)(12). (f) Exclusion from gross income Any credit or refund allowed or made by reason of this section shall not be includible in gross income or alternative minimum taxable income. (g) Regulations The Secretary may by regulations prescribe the conditions, not inconsistent with the provisions of this section, under which payments may be made under this section. . (f) Effective date The amendments made by this section shall apply to coal refuse used to produce electricity after December 31, 2017, in taxable years beginning after such date.