I've just closed http://bugs.gentoo.org/show_bug.cgi?id=105016. But bugs like these shouldn't be around in the first place. When you remove a package from tree, please grep the profiles/ directory for matching entries and remove them too.
Anyhow, package.mask's and package.use.mask's should all be cleaned now, unless I missed something ofc. Thanks to idl0r for this scripts! Main package.mask has still some ancient cruft left that aren't so obvious why they are masked to everyone, except the person who masked them in the first place and unfortunately not all of them are around anymore.. :-/ If you have some.. please audit it. Thanks, Samuli