create layer from selection without loosing group hierarchy

I've several group sub-group project organization.
Now i have to switch to layer to benefit of scene states.
When i select a closed group and add it to new layer, i loose all previous sub group hierarchy.
How can i proceed?