In the case of any taxable year ending after the date of the enactment of this section, paragraph (1) shall not apply to the extent that it would (but for this paragraph) operate to create (or increase) a net operating loss for the terminal railroad corporation for the taxable year.
Subject to the limitation in subsection (a)(2), in computing the taxable income of any shareholder of a terminal railroad corporation, no amount shall be considered to have been received or accrued or paid or incurred by such shareholder as a result of any discharge of liability described in subsection (a)(1)(A)(i) or as a result of any computation of charges in the manner described in subsection (a)(1)(A)(ii).
In the case of any taxable year, subsections (a) and (b) shall apply with respect to any discharge of liability described in subsection (a)(1)(A)(i), and to any computation of charges in the manner described in subsection (a)(1)(A)(ii), only if such discharge or computation (as the case may be) was provided for in a written agreement, to which all of the shareholders of the terminal railroad corporation were parties, entered into before the beginning of such taxable year.
The term “related terminal services” includes only services, and the use of facilities, taken into account in computing related terminal income.
The Secretary shall prescribe such regulations as may be necessary to carry out the purposes of this section.