Fix loading of embedded layers and groups in WMS server