Fix get_current_max_groups_per_user. Issue #6923