I am not sure what exactly you want ot achive.
There is a mergeLayers option which would merge setting to 'true' all layers in the result, by setting to 'false' retain the layers.
false (default) - Layers from different source documents are kept distinct in the assembled document. If the layerLabel attribute in the source document is specified, the names are modified by the label; otherwise, the layers keep the same names.
rgs
Dieter