Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12725)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12726)
@@ -197,4 +197,24 @@
     public static UndoRedoHandler undoRedo;
 
+    private static final LayerChangeListener undoRedoCleaner = new LayerChangeListener() {
+        @Override
+        public void layerRemoving(LayerRemoveEvent e) {
+            Layer layer = e.getRemovedLayer();
+            if (layer instanceof OsmDataLayer) {
+                undoRedo.clean(((OsmDataLayer) layer).data);
+            }
+        }
+
+        @Override
+        public void layerOrderChanged(LayerOrderChangeEvent e) {
+            // Do nothing
+        }
+
+        @Override
+        public void layerAdded(LayerAddEvent e) {
+            // Do nothing
+        }
+    };
+
     /**
      * Listener that sets the enabled state of undo/redo menu entries.
@@ -220,23 +240,5 @@
         this.mainFrame = mainFrame;
         undoRedo = super.undoRedo;
-        getLayerManager().addLayerChangeListener(new LayerChangeListener() {
-            @Override
-            public void layerRemoving(LayerRemoveEvent e) {
-                Layer layer = e.getRemovedLayer();
-                if (layer instanceof OsmDataLayer) {
-                    undoRedo.clean(((OsmDataLayer) layer).data);
-                }
-            }
-
-            @Override
-            public void layerOrderChanged(LayerOrderChangeEvent e) {
-                // Do nothing
-            }
-
-            @Override
-            public void layerAdded(LayerAddEvent e) {
-                // Do nothing
-            }
-        });
+        getLayerManager().addLayerChangeListener(undoRedoCleaner);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 12725)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 12726)
@@ -77,7 +77,7 @@
 import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
+import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
 import org.openstreetmap.josm.data.osm.search.SearchCompiler;
 import org.openstreetmap.josm.data.osm.search.SearchSetting;
-import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
 import org.openstreetmap.josm.data.preferences.StringProperty;
 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java	(revision 12725)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/SavingAction.java	(revision 12726)
@@ -103,9 +103,10 @@
      */
     protected void applyExistingNonConflictingRelation(TagEditorModel tagEditorModel) {
-        Relation editedRelation = new Relation(editor.getRelation());
+        Relation originRelation = editor.getRelation();
+        Relation editedRelation = new Relation(originRelation);
         tagEditorModel.applyToPrimitive(editedRelation);
         memberTableModel.applyToRelation(editedRelation);
-        if (!editedRelation.hasEqualSemanticAttributes(editor.getRelation(), false)) {
-            MainApplication.undoRedo.add(new ChangeCommand(editor.getRelation(), editedRelation));
+        if (!editedRelation.hasEqualSemanticAttributes(originRelation, false)) {
+            MainApplication.undoRedo.add(new ChangeCommand(originRelation, editedRelation));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 12725)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 12726)
@@ -158,5 +158,5 @@
     class ChangesetReviewChangeListener implements ChangeListener {
 
-        private final String key = "review_requested";
+        private static final String KEY = "review_requested";
 
         @Override
@@ -164,7 +164,7 @@
             if (e.getSource() instanceof ChangesetReviewModel) {
                 boolean newState = ((ChangesetReviewModel) e.getSource()).isReviewRequested();
-                boolean oldState = "yes".equals(Optional.ofNullable(getTagEditorValue(key)).orElse(""));
+                boolean oldState = "yes".equals(Optional.ofNullable(getTagEditorValue(KEY)).orElse(""));
                 if (oldState != newState) {
-                    setProperty(key, newState ? "yes" : null);
+                    setProperty(KEY, newState ? "yes" : null);
                 }
             }
