When duplicating a layer, do it within LayerEditingManager, so changes are committed when finished