I quote from https://enterprise.arcgis.com/en/server/11.2/publish-services/windows/available-wms-service-properti...:
"By default, WMS services do not assign a <Name> to group layers. The namedLayersMode property allows you to control how layers in a WMS service are assigned a Name identifier."
Unfortunatelly this STILL needs to be done in the admin interface by overwriting the service definition. This is a tedious process and prone to errors. PLEASE add an option in the manager interface!