Notwithstanding anything contained in this Chapter, where a change in shareholding has taken place in a previous year,-
(a) in the case of a company not being a company in which the public are substantially interested and other than a company referred to in clause (b), no loss incurred in any year prior to the previous year shall be carried forward and set off against the income of the previous year, unless on the last day of the previous year, the shares of the company carrying not less than fifty-one per cent of the voting power were beneficially held by persons who beneficially held shares of the company carrying not less than fifty-one per cent of the voting power on the last day of the year or years in which the loss was incurred;
(b) in the case of a company, not being a company in which the public are substantially interested but being an eligible start-up as referred to in section 80-IAC, the loss incurred in any year prior to the previous year shall be carried forward and set off against the income of the previous year, if, all the shareholders of such company who held shares carrying voting power on the last day of the year or years in which the loss was incurred,-
(i) continue to hold those shares on the last day of such previous year; and
(ii) such loss has been incurred during the period of seven years beginning from the year in which such company is incorporated:
Provided that nothing contained in this section shall apply to a case where a change in the said voting power and shareholding takes place in a previous year consequent upon the death of a shareholder or on account of transfer of shares by way of gift to any relative of the shareholder making such gift:
Provided further that nothing contained in this section shall apply to any change in the shareholding of an Indian company which is a subsidiary of a foreign company as a result of amalgamation or demerger of a foreign company subject to the condition that fifty-one per cent shareholders of the amalgamating or demerged foreign company continue to be the shareholders of the amalgamated or the resulting foreign company:]
16[Provided also that nothing contained in this section shall apply to a company where a change in the shareholding takes place in a previous year pursuant to a resolution plan approved under the Insolvency and Bankruptcy Code, 2016 (31 of 2016), after affording a reasonable opportunity of being heard to the jurisdictional Principal Commissioner or Commissioner.]