Index: src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
===================================================================
--- src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 34841)
+++ src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(working copy)
@@ -211,20 +211,15 @@
         boolean overrideNewCheck = false;
         int idxNew = selection.get(0).isNew() ? 0 : 1;
         if (selection.get(1-idxNew).isNew()) {
-            // if both are new, select the one with all the DB nodes
-            boolean areNewNodes = false;
-            for (Node n : selection.get(0).getNodes()) {
-                if (n.isNew()) {
-                    areNewNodes = true;
-                }
-            }
-            idxNew = areNewNodes ? 0 : 1;
-            overrideNewCheck = true;
-            for (Node n : selection.get(1 - idxNew).getNodes()) {
-                if (n.isNew()) {
-                    overrideNewCheck = false;
-                }
-            }
+            // if both are new, select the one with DB nodes if the other has none
+        	boolean hasOldS0 = selection.get(0).getNodes().stream().anyMatch(n->!n.isNew());
+        	boolean hasOldS1 = selection.get(1).getNodes().stream().anyMatch(n->!n.isNew());
+        	if (hasOldS0 != hasOldS1) {
+        		overrideNewCheck = true;
+        		if (hasOldS0) {
+        			idxNew = 1;
+        		}
+        	}
         }
         Way referenceWay = selection.get(idxNew);
         Way subjectWay = selection.get(1 - idxNew);
