If not a layer group use the layer name

fix #1030
again :-)
If ``childLayers = [layer.name]`` don't we get an error with ``childLayers[k].name`` at line 137?