Fix crash when primary gid has no corresponding group (issue #23).