The Geoserver API returns lists for styles & publishables in a layergroup in case the layergroup contains more than one layer; if the layergroup contains only one layer, however, "styles" may either be a string or a dictionary.
The current implementation of add_layer_to_layergroup would however only check if styles is a string and thus fail when confronted with a dictionary.
Solution description:
The "single-layer" check now checks for "is not a list" rather than for "is a string"
Bug description:
Solution description: