Many instance_* element's can have an sid and name attribute.
Some of these don't get saved out if they are specified. This happens with instance_light, instance_node, instance_camera and probably most of the rest of them.
The problem stems from the fact that they inherit from domInstanceWithExtra but do not overwrite the mutator functions to set the validAttributeArray to true when you set the attribute. The dom checks for this when outputing optional attributes.