In the case of any foreign trust, the term “taxes imposed on the trust” includes the amount, reduced as provided in the last sentence of paragraph (1), of any income, war profits, and excess profits taxes imposed by any foreign country or possession of the United States on such foreign trust which, as determined under paragraph (1), are so properly allocable. Under rules or regulations prescribed by the Secretary, in the case of any foreign trust of which the settlor or another person would be treated as owner of any portion of the trust under subpart E but for section
672
(f), the term “taxes imposed on the trust” includes the allocable amount of any income, war profits, and excess profits taxes imposed by any foreign country or possession of the United States on the settlor or such other person in respect of trust income.