I believe that your tax advisor is incorrect on both counts: (1) that the gains should be in the income resourced by treaty and (2) that if the gain should be in that category that the excess foreign tax credits cannot be carried back or forward.
For the source of the gain, I believe that the gain should be passive foreign-source income because you have a tax home outside the US and you paid at least a 10% tax to the UK on the gain. This means that you are considered a nonresident of the US under
Section 865(g)(2) for purposes of sourcing the gains. Since you are considered a nonresident, the gains are considered foreign-source income. It doesn’t matter that a 1099 was issued or that the sale was through a US brokerage account.
With respect to whether you can carryback the excess foreign tax credits for income that is resourced by a treaty,
Section 904(d)(6) is the statute that provides the rule that the foreign tax credit limitation applies separately to this type of income. Section 904(d)(6) states:
If (i) * * * any item of income would be treated as derived from sources within the United States, [and] (ii) under a treaty * * * such item would be treated as arising from sources outside the United States * * * [then] subsections * * * (c) of this section * * * shall be applied separately with respect to each such item.
Subsection (c) of section 904 contains the rule that says excess foreign tax credits can be carried back 1 year and forward 10 years. Therefore, the statute (Section 904(d)(6)) explicitly provides that excess foreign tax credits in the resourced by treaty category can be carried back / forward.
These rules are complicated. It is not surprising that they are screwing it up.