Index: /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 5142)
+++ /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 5143)
@@ -114,7 +114,5 @@
 
             for (OsmPrimitive osm : objects) {
-                boolean modified = false;
-
-                 // loop over all tags
+                // loop over all tags
                 for (Map.Entry<String, String> tag : this.tags.entrySet()) {
                     String oldVal = osm.get(tag.getKey());
@@ -122,15 +120,13 @@
 
                     if (newVal == null || newVal.isEmpty()) {
-                        if (oldVal != null) {
+                        if (oldVal != null)
                             osm.remove(tag.getKey());
-                            modified = true;
-                        }
                     }
                     else if (oldVal == null || !newVal.equals(oldVal))
                         osm.put(tag.getKey(), newVal);
-                        modified = true;
-                }
-                if (modified)
-                    osm.setModified(true);
+                }
+                // init() only keeps modified primitives. Therefore the modified
+                // bit can be set without further checks.
+                osm.setModified(true);
             }
             return true;
