Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java	(revision 495)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java	(revision 496)
@@ -230,6 +230,4 @@
 
 		for (P my : primitives) {
-			Date myd = my.timestamp == null ? new Date(0) : my.getTimestamp();
-			Date otherd = other.timestamp == null ? new Date(0) : other.getTimestamp();
 			if (my.realEqual(other, false)) {
 				merged.put(other, my);
@@ -237,4 +235,7 @@
 			}
 			if (my.realEqual(other, true)) {
+				Date myd = my.timestamp == null ? new Date(0) : my.getTimestamp();
+				Date otherd = other.timestamp == null ? new Date(0) : other.getTimestamp();
+
 				// they differ in modified/timestamp combination only. Auto-resolve it.
 				merged.put(other, my);
@@ -246,4 +247,7 @@
 			}
 			if (my.id == other.id && my.id != 0) {
+				Date myd = my.timestamp == null ? new Date(0) : my.getTimestamp();
+				Date otherd = other.timestamp == null ? new Date(0) : other.getTimestamp();
+
 				if (my.incomplete || other.incomplete) {
 					if (my.incomplete) {
