Fixed a problem handling GID_NONE in match_gid().