Judging from the comment and the code, RESTRICT=userpriv is actually needed for 'test?' only. Please keep the bug open as long as there's any kind of userpriv restriction in the ebuild. I think we ought to solve this via some kind of supplementary group support rather than raising privileges for the build process.