diff --git a/src/org/openstreetmap/josm/command/Command.java b/src/org/openstreetmap/josm/command/Command.java
index 514ec5f..404f59a 100644
--- a/src/org/openstreetmap/josm/command/Command.java
+++ b/src/org/openstreetmap/josm/command/Command.java
@@ -176,23 +176,16 @@ abstract public class Command extends PseudoCommand {
      */
     public static boolean checkAndConfirmOutlyingOperation(String operation,
             String dialogTitle, String outsideDialogMessage, String incompleteDialogMessage,
-            Area area, Collection<? extends OsmPrimitive> primitives, OsmPrimitive ignore) {
+            Area area, Collection<? extends OsmPrimitive> primitives,
+            Collection<? extends OsmPrimitive> ignore) {
         boolean outside = false;
         boolean incomplete = false;
-        if (area != null) {
-            for (OsmPrimitive osm : primitives) {
-                if (osm.isIncomplete()) {
-                    incomplete = true;
-                } else if (isOutlying(osm, area)
-                        && (ignore == null || !ignore.equals(osm))) {
-                    outside = true;
-                }
-            }
-        } else {
-            for (OsmPrimitive osm : primitives) {
-                if (osm.isIncomplete()) {
-                    incomplete = true;
-                }
+        for (OsmPrimitive osm : primitives) {
+            if (osm.isIncomplete()) {
+                incomplete = true;
+            } else if (area != null && isOutlying(osm, area)
+                    && (ignore == null || !ignore.contains(osm))) {
+                outside = true;
             }
         }
         if (outside) {
diff --git a/src/org/openstreetmap/josm/command/DeleteCommand.java b/src/org/openstreetmap/josm/command/DeleteCommand.java
index e6751cc..a3aefc5 100644
--- a/src/org/openstreetmap/josm/command/DeleteCommand.java
+++ b/src/org/openstreetmap/josm/command/DeleteCommand.java
@@ -357,7 +357,8 @@ public class DeleteCommand extends Command {
             primitivesToDelete.addAll(nodesToDelete);
         }
 
-        if (!silent && !checkAndConfirmOutlyingDelete(layer, primitivesToDelete, null))
+        if (!silent && !checkAndConfirmOutlyingDelete(layer,
+                primitivesToDelete, Utils.filteredCollection(primitivesToDelete, Way.class)))
             return null;
 
         waysToBeChanged.addAll(OsmPrimitive.getFilteredSet(OsmPrimitive.getReferrer(primitivesToDelete), Way.class));
@@ -453,11 +454,11 @@ public class DeleteCommand extends Command {
         }
     }
 
-    public static boolean checkAndConfirmOutlyingDelete(OsmDataLayer layer, Collection<? extends OsmPrimitive> primitives, OsmPrimitive ignore) {
+    public static boolean checkAndConfirmOutlyingDelete(OsmDataLayer layer, Collection<? extends OsmPrimitive> primitives, Collection<? extends OsmPrimitive> ignore) {
         return checkAndConfirmOutlyingDelete(layer.data.getDataSourceArea(), primitives, ignore);
     }
 
-    public static boolean checkAndConfirmOutlyingDelete(Area area, Collection<? extends OsmPrimitive> primitives, OsmPrimitive ignore) {
+    public static boolean checkAndConfirmOutlyingDelete(Area area, Collection<? extends OsmPrimitive> primitives, Collection<? extends OsmPrimitive> ignore) {
         return Command.checkAndConfirmOutlyingOperation("delete",
                 tr("Delete confirmation"),
                 tr("You are about to delete nodes outside of the area you have downloaded."
diff --git a/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java b/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
index 584a584..41acc1b 100644
--- a/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
+++ b/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
@@ -6,6 +6,7 @@ import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -383,7 +384,7 @@ public class DuplicateNode extends Test {
             target = nodes.iterator().next();
         }
 
-        if (DeleteCommand.checkAndConfirmOutlyingDelete(Main.main.getCurrentDataSet().getDataSourceArea(), nodes, target))
+        if (DeleteCommand.checkAndConfirmOutlyingDelete(Main.main.getCurrentDataSet().getDataSourceArea(), nodes, Collections.singleton(target)))
             return MergeNodesAction.mergeNodes(Main.main.getEditLayer(), nodes, target);
 
         return null;// undoRedo handling done in mergeNodes
