Place the lock in the right place...
Fixed an error in the InsertsUndoAction

Redoing the insert should add the element to the
layer, not remove it.