Index: /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 12688)
+++ /trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 12689)
@@ -93,5 +93,5 @@
         if (targetNode != null) {
             Node targetLocationNode = selectTargetLocationNode(selectedNodes);
-            Command cmd = mergeNodes(getLayerManager().getEditLayer(), selectedNodes, targetNode, targetLocationNode);
+            Command cmd = mergeNodes(selectedNodes, targetNode, targetLocationNode);
             if (cmd != null) {
                 MainApplication.undoRedo.add(cmd);
@@ -272,5 +272,5 @@
 
         if (target != null) {
-            Command cmd = mergeNodes(layer, nodes, target, targetLocationNode);
+            Command cmd = mergeNodes(nodes, target, targetLocationNode);
             if (cmd != null) {
                 MainApplication.undoRedo.add(cmd);
@@ -281,14 +281,28 @@
 
     /**
-     * Merges the nodes in {@code nodes} at the specified node's location. Uses the dataset
-     * managed by {@code layer} as reference.
-     *
-     * @param layer layer the reference data layer. Must not be null.
+     * Merges the nodes in {@code nodes} at the specified node's location.
+     *
+     * @param layer unused
      * @param nodes the collection of nodes. Ignored if null.
      * @param targetLocationNode this node's location will be used for the targetNode.
      * @return The command necessary to run in order to perform action, or {@code null} if there is nothing to do
      * @throws IllegalArgumentException if {@code layer} is null
-     */
+     * @deprecated use {@link #mergeNodes(Collection, Node)} instead
+     */
+    @Deprecated
     public static Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetLocationNode) {
+        return mergeNodes(nodes, targetLocationNode);
+    }
+
+    /**
+     * Merges the nodes in {@code nodes} at the specified node's location.
+     *
+     * @param nodes the collection of nodes. Ignored if null.
+     * @param targetLocationNode this node's location will be used for the targetNode.
+     * @return The command necessary to run in order to perform action, or {@code null} if there is nothing to do
+     * @throws IllegalArgumentException if {@code layer} is null
+     * @since 12689
+     */
+    public static Command mergeNodes(Collection<Node> nodes, Node targetLocationNode) {
         if (nodes == null) {
             return null;
@@ -296,12 +310,10 @@
         Set<Node> allNodes = new HashSet<>(nodes);
         allNodes.add(targetLocationNode);
-        return mergeNodes(layer, nodes, selectTargetNode(allNodes), targetLocationNode);
-    }
-
-    /**
-     * Merges the nodes in <code>nodes</code> onto one of the nodes. Uses the dataset
-     * managed by <code>layer</code> as reference.
-     *
-     * @param layer layer the reference data layer. Must not be null.
+        return mergeNodes(nodes, selectTargetNode(allNodes), targetLocationNode);
+    }
+
+    /**
+     * Merges the nodes in <code>nodes</code> onto one of the nodes.
+     *
      * @param nodes the collection of nodes. Ignored if null.
      * @param targetNode the target node the collection of nodes is merged to. Must not be null.
@@ -310,6 +322,5 @@
      * @throws IllegalArgumentException if layer is null
      */
-    public static Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetNode, Node targetLocationNode) {
-        CheckParameterUtil.ensureParameterNotNull(layer, "layer");
+    public static Command mergeNodes(Collection<Node> nodes, Node targetNode, Node targetLocationNode) {
         CheckParameterUtil.ensureParameterNotNull(targetNode, "targetNode");
         if (nodes == null) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 12688)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 12689)
@@ -722,5 +722,5 @@
         Node targetNode = MergeNodesAction.selectTargetNode(changedNodes);
         Node locNode = MergeNodesAction.selectTargetLocationNode(changedNodes);
-        Command mergeCmd = MergeNodesAction.mergeNodes(MainApplication.getLayerManager().getEditLayer(), changedNodes, targetNode, locNode);
+        Command mergeCmd = MergeNodesAction.mergeNodes(changedNodes, targetNode, locNode);
         if (mergeCmd != null) {
             MainApplication.undoRedo.add(mergeCmd);
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 12688)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 12689)
@@ -34,5 +34,4 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
-import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.MultiMap;
@@ -334,5 +333,5 @@
 
             if (Command.checkOutlyingOrIncompleteOperation(nodes, Collections.singleton(target)) == Command.IS_OK)
-                return MergeNodesAction.mergeNodes(MainApplication.getLayerManager().getEditLayer(), nodes, target);
+                return MergeNodesAction.mergeNodes(nodes, target);
         }
 
