Make "Insert Metadata" command undoable