Assert head pointer isn't NULL if sql_get_grouplist returned 1 or more groups