diff --git a/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java b/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
index 3d8fd76..a11f049 100644
--- a/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
+++ b/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
@@ -426,7 +426,22 @@ public class SelectAction extends MapMode implements AWTEventListener, Selection
             }
 
             if (mode == Mode.move) {
-                if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand) c).getParticipatingPrimitives())) {
+                boolean reuseMoveCommand = false;
+                if (c instanceof MoveCommand && affectedNodes.size() == ((MoveCommand) c).getParticipatingPrimitives().size()) {
+                    MoveCommand mc = (MoveCommand) c;
+                    int matchCount = 0;
+                    for (Node an : affectedNodes) {
+                        for (Node pn : mc.getParticipatingPrimitives()) {
+                            if (pn.equals(an) && pn.getDataSet() == an.getDataSet()) {
+                                matchCount++;
+                            }
+                        }
+                    }
+                    if(matchCount == affectedNodes.size() && matchCount == mc.getParticipatingPrimitives().size()) {
+                        reuseMoveCommand = true;
+                    }
+                }
+                if (reuseMoveCommand) {
                     ((MoveCommand) c).moveAgain(dx, dy);
                 } else {
                     Main.main.undoRedo.add(
