Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 9960)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 9961)
@@ -357,5 +357,5 @@
             // target is same as source but target is modified
             // => keep target and reset modified flag if target and source are semantically equal
-            if (target.hasEqualSemanticAttributes(source)) {
+            if (target.hasEqualSemanticAttributes(source, false)) {
                 target.setModified(false);
             }
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 9960)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 9961)
@@ -1238,11 +1238,13 @@
      */
     public boolean hasEqualSemanticAttributes(OsmPrimitive other) {
+        return hasEqualSemanticAttributes(other, true);
+    }
+
+    boolean hasEqualSemanticAttributes(final OsmPrimitive other, final boolean testInterestingTagsOnly) {
         if (!isNew() &&  id != other.id)
             return false;
         if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159)
             return false;
-        // can't do an equals check on the internal keys array because it is not ordered
-        //
-        return hasSameInterestingTags(other);
+        return testInterestingTagsOnly ? hasSameInterestingTags(other) : getKeys().equals(other.getKeys());
     }
 
