
Hello,
There is a bug in the layers code when loading an SVG document with a single group (g element) and adding layers to it.
In this case, Inkscape will sometimes show "Root" as a layer and when I move objects between the layers, they get sometimes lost.
I even had the effect that I moved six elements and afterwards, three were in the layer and three were gone.
A couple of undos usually get the objects back.
I'd propose that you create a new artificial layer when a document has none and the user adds one (ie. after adding the first layer, the user will have two layers).
Alternatively, move all objects into the first created layer.
Or, even better, realize layers with classes. Since an object can be in several classes (you have to separate the class names with blanks, I think), objects could be in several layers at once.
Regards,