(3)Where the rights either come to an end without being subsequently revived or are sold in their entirety and the proceeds of the sale (so far as they consist of capital sums) are less than the cost of acquisition thereof remaining unallowed, a deduction equal to such cost remaining unallowed, or, as the case may be, such cost remaining unallowed as reduced by the proceeds of the sale, shall be allowed in respect of the previous year in which the rights come to an end, or, as the case may be, are sold.