In the case of the demolition of any structure—
(1)
no deduction otherwise allowable under this chapter shall be allowed to the owner or lessee of such structure for—
(A)
any amount expended for such demolition, or
(B)
any loss sustained on account of such demolition; and
(2)
amounts described in paragraph (1) shall be treated as properly chargeable to capital account with respect to the land on which the demolished structure was located.