Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 628)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 629)
@@ -161,14 +161,15 @@
 
 	/**
-	 * Equal, if the id (and class) is equal. If both ids are 0, use the super classes
-	 * equal instead.
+	 * Equal, if the id (and class) is equal. 
 	 * 
 	 * An primitive is equal to its incomplete counter part.
 	 */
-	@Override public final boolean equals(Object obj) {
-		if (obj == null || getClass() != obj.getClass() || id == 0 || ((OsmPrimitive)obj).id == 0)
-			return super.equals(obj);
-		return id == ((OsmPrimitive)obj).id;
-	}
+    @Override public boolean equals(Object obj) {
+        if (id == 0) return obj == this;
+        if (obj instanceof OsmPrimitive) { // not null too
+            return ((OsmPrimitive)obj).id == id && obj.getClass() == getClass();
+        }
+        return false;
+    }
 
 	/**
