we should export a different T to src_* and to pkg_* functions ... in fact, might be good to have a different T for only internal portage use (environment/logs/etc...) ... that way ebuilds are free to use $T without having to worry about clobbering portage files and portage is free to use $T without having to worry about clobbering ebuild files then we would block access to the other T's when in other functions (aka, block access to internal/pkg_* T when in src_* and block access to internal/src_* T when in pkg_*)
btw, i'm not saying the variable we use internally should be named the same as what we export to ebuilds ... i imagine it'd be a huge pain to distinguish between $T when reading/working with portage code perhaps we now have three vars (none named $T) for use internally and we just export the properly one as $T when invoking the ebuild code
Well, if you can cook up a patch for it ...