(3) If at a specified time in a trust’s particular taxation year (other than a trust that is, at that time, an exempt foreign trust) the trust is non-resident (determined without reference to this subsection) and, at that time, there is a resident contributor to the trust or a resident beneficiary under the trust,