USERADMIN_SECONDARY env variable is not set before post hook script execution. In save_user.cgi file currently undef is passed instead of sgid list.
For batch operations USERADMIN_SECONDARY is set properly (according to source code)
I attached a patch with the fix of this problem. I compressed all branch changes in one patch (dropped branch dev history)