portage.py and emerge mix spaces and tabs which python's tabnanny module say could potentially cause strange errors, I experienced one of the strange errors with bug 29486. I think I've fixed this by using the tabnanny module and checking every file that portage/emerge imports for ambiguous mixtures of tabs and spaces.
Also, in order to fix this I needed to move emergehelp.py from /usr/lib/portage/bin to /usr/lib/python2.2/site-packages -- I did a quick check of all the import statments in portage.py and emerge and I didn't see anything strange but I'm still not sure what's happening with this bug... fixing the whitespace and moving the emergehelp module seems to fix everything though.
Created attachment 18240 [details, diff] emerge patch
Created attachment 18241 [details, diff] portage.py patch
Both patches diffed against 2.0.49-r6
Integrated.