LOGNAME="root" is still set in ebuild environment when using FEATURES="userpriv". Portage should update value of this variable. Some programs check this variable. E.g. getpass.getuser() in Python standard library (https://docs.python.org/3.5/library/getpass.html#getpass.getuser).
I have a patch in the following branch: https://github.com/zmedico/portage/tree/bug_534722 I've posted it for review here: http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5127
This is in the master branch now: https://github.com/gentoo/portage/commit/683245a4b6f0790212c06eb021642cda484f86d8
Released in portage-2.2.16