GEOS-5847 fixed issue with nested layergroups