"no deduction shall be allowed under this section in respect of the cost of any residential unit or an improvement to a residential unit that has been disposed of by the taxpayer during any previous year of assessment"