Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 6201)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 6202)
@@ -28,5 +28,4 @@
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.RelationToChildReference;
 import org.openstreetmap.josm.data.osm.TagCollection;
 import org.openstreetmap.josm.data.osm.Way;
@@ -50,7 +49,12 @@
  * The "surviving" node will be moved to that location if it is
  * different from the last selected node.
+ * 
+ * @since 422
  */
 public class MergeNodesAction extends JosmAction {
 
+    /**
+     * Constructs a new {@code MergeNodesAction}.
+     */
     public MergeNodesAction() {
         super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."),
@@ -247,4 +251,12 @@
     }
 
+    /**
+     * 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
+     * @param nodes the collection of nodes. Ignored if null
+     * @param targetLocationNode this node's location will be used for the target node
+     * @throws IllegalArgumentException thrown if {@code layer} is null
+     */
     public static void doMergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetLocationNode) {
         if (nodes == null) {
@@ -253,5 +265,10 @@
         Set<Node> allNodes = new HashSet<Node>(nodes);
         allNodes.add(targetLocationNode);
-        Node target = selectTargetNode(allNodes);
+        Node target;
+        if (nodes.contains(targetLocationNode) && !targetLocationNode.isNew()) {
+            target = targetLocationNode; // keep existing targetLocationNode as target to avoid unnecessary changes (see #2447)
+        } else {
+            target = selectTargetNode(allNodes);
+        }
 
         Command cmd = mergeNodes(layer, nodes, target, targetLocationNode);
@@ -262,4 +279,14 @@
     }
 
+    /**
+     * 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.
+     * @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 thrown if {@code layer} is null
+     */
     public static Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetLocationNode) {
         if (nodes == null) {
@@ -279,4 +306,5 @@
      * @param targetNode the target node the collection of nodes is merged to. Must not be 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 thrown if layer is null
      */
@@ -287,6 +315,4 @@
             return null;
         }
-
-        Set<RelationToChildReference> relationToNodeReferences = RelationToChildReference.getRelationToChildReferences(nodes);
 
         try {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 6201)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 6202)
@@ -817,5 +817,5 @@
 
     /**
-     * Merges the selected nodes to the one closest to the given mouse position iff the control
+     * Merges the selected nodes to the one closest to the given mouse position if the control
      * key is pressed. If there is no such node, no action will be done and no error will be
      * reported. If there is, it will execute the merge and add it to the undo buffer.
