and for this purpose any loss or other amount to be set against the profits of a company in determining the distributable profits shall be set first against profits other than the profits so arising or, as the case may be, representing so much of the distribution as was attributable to chargeable profits.