Here's the fix. Line 89 of admin/dochangeusergroups.php has this:

$isin .= "'gid',";

That should be:

$isin .= "'$gid',";