2.5.x backport of [GEOS-6374] Added support for non-default style on layer in layergroup

Backport of GEOS-6374 to maintenance branch.