kern: fix freebsd14 getgroups(2) compat
We need to actually copyout the remainder of the groups if the egid
succeeded, not failed. My test that was designed to catch this along
with the previously-found syzkaller panic did not zero out the groups
array prior to re-fetching, so it did not catch that entries beyond the
first were not actually populated.
Pointy hat: kevans
Fixes: 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]")