Index: /applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java
===================================================================
--- /applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java	(revision 36232)
+++ /applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java	(revision 36233)
@@ -504,5 +504,5 @@
 
     public void fixNodesWithoutCoordinates(ProgressMonitor progressMonitor) throws OsmTransferException {
-        Collection<Node> nodes = nds.getNodes();
+        Collection<Node> nodes = new ArrayList<>(nds.getNodes());
         int num = nodes.size();
         progressMonitor.beginTask(addChangesetIdPrefix(
@@ -510,4 +510,12 @@
                 // downloads == num ticks, then we get the downloaded data (1 tick), then we process the nodes (num ticks)
                 2 * num + 1);
+
+        // Remove primitives where we already know the LatLon.
+        nodes.removeIf(n -> {
+            PrimitiveId id = n.getPrimitiveId();
+            OsmPrimitive p = ds.getPrimitiveById(id);
+            return !(p instanceof Node) || ((Node) p).isLatLonKnown();
+        });
+        progressMonitor.worked(num - nodes.size());
 
         // Do bulk version fetches first
@@ -526,20 +534,5 @@
                 versionMap.replaceAll((key, value) -> value - 1);
                 versionMap.values().removeIf(i -> i <= 0);
-                ds.update(() -> {
-                    for (Node n : nodes) {
-                        if (!n.isDeleted() && !n.isLatLonKnown()) {
-                            final Node historyNode = (Node) history.getPrimitiveById(n);
-                            if (historyNode != null && historyNode.isLatLonKnown()
-                                    && changeset.getClosedAt().isAfter(historyNode.getInstant())) {
-                                n.load(historyNode.save());
-                                versionMap.remove(n.getUniqueId());
-                                progressMonitor.worked(1);
-                            }
-                        }
-                        if (progressMonitor.isCanceled()) {
-                            break;
-                        }
-                    }
-                });
+                ds.update(() -> updateNodes(progressMonitor, nodes, versionMap, history));
                 if (progressMonitor.isCanceled()) {
                     break;
@@ -548,4 +541,28 @@
         } finally {
             progressMonitor.finishTask();
+        }
+    }
+
+    /**
+     * Update nodes lacking a lat/lon
+     * @param progressMonitor The monitor to update
+     * @param nodes The nodes to update
+     * @param versionMap The version map to update for the next round
+     * @param history The history dataset
+     */
+    private void updateNodes(ProgressMonitor progressMonitor, Collection<Node> nodes, Map<Long, Integer> versionMap, DataSet history) {
+        for (Node n : nodes) {
+            if (!n.isDeleted() && !n.isLatLonKnown()) {
+                final Node historyNode = (Node) history.getPrimitiveById(n);
+                if (historyNode != null && historyNode.isLatLonKnown()
+                        && changeset.getClosedAt().isAfter(historyNode.getInstant())) {
+                    n.load(historyNode.save());
+                    versionMap.remove(n.getUniqueId());
+                    progressMonitor.worked(1);
+                }
+            }
+            if (progressMonitor.isCanceled()) {
+                break;
+            }
         }
     }
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932-c5e3af31-9ec6-411a-a730-f4d5182dc7ab.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932-c5e3af31-9ec6-411a-a730-f4d5182dc7ab.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932-c5e3af31-9ec6-411a-a730-f4d5182dc7ab.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "c5e3af31-9ec6-411a-a730-f4d5182dc7ab",
+  "name": "0.6_changeset_149181932",
+  "request": {
+    "url": "/0.6/changeset/149181932",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"CGImap 0.9.0 (625010 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <changeset id=\"149181932\" created_at=\"2024-03-26T14:55:59Z\" closed_at=\"2024-03-26T15:55:59Z\" open=\"false\" user=\"bxl-forever\" uid=\"2644288\" min_lat=\"50.8364152\" min_lon=\"4.3559661\" max_lat=\"50.8372364\" max_lon=\"4.3581014\" comments_count=\"0\" changes_count=\"1\">\n  <tag k=\"comment\" v=\"Specify road surfaces\"/>\n  <tag k=\"created_by\" v=\"StreetComplete 57.1\"/>\n  <tag k=\"locale\" v=\"en-US\"/>\n  <tag k=\"source\" v=\"survey\"/>\n  <tag k=\"StreetComplete:quest_type\" v=\"AddRoadSurface\"/>\n </changeset>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:38 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "c5e3af31-9ec6-411a-a730-f4d5182dc7ab",
+  "insertionIndex": 10
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932_download-9c68cf67-51e0-44e5-850b-4470024a49d3.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932_download-9c68cf67-51e0-44e5-850b-4470024a49d3.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_changeset_149181932_download-9c68cf67-51e0-44e5-850b-4470024a49d3.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "9c68cf67-51e0-44e5-850b-4470024a49d3",
+  "name": "0.6_changeset_149181932_download",
+  "request": {
+    "url": "/0.6/changeset/149181932/download",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osmChange version=\"0.6\" generator=\"CGImap 0.9.0 (1934400 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <modify>\n  <way id=\"40487768\" visible=\"true\" version=\"7\" changeset=\"149181932\" timestamp=\"2024-03-26T14:55:59Z\" user=\"bxl-forever\" uid=\"2644288\">\n   <nd ref=\"257553745\"/>\n   <nd ref=\"4031338294\"/>\n   <nd ref=\"490699158\"/>\n   <nd ref=\"4031337541\"/>\n   <nd ref=\"4031337542\"/>\n   <nd ref=\"4031337543\"/>\n   <nd ref=\"4031337551\"/>\n   <nd ref=\"142038322\"/>\n   <tag k=\"highway\" v=\"service\"/>\n   <tag k=\"lit\" v=\"yes\"/>\n   <tag k=\"maxspeed\" v=\"30\"/>\n   <tag k=\"name\" v=\"Boulevard de Waterloo - Waterloolaan\"/>\n   <tag k=\"name:fr\" v=\"Boulevard de Waterloo\"/>\n   <tag k=\"name:nl\" v=\"Waterloolaan\"/>\n   <tag k=\"oneway\" v=\"yes\"/>\n   <tag k=\"service\" v=\"parking_aisle\"/>\n   <tag k=\"source:maxspeed\" v=\"BE-BRU:urban\"/>\n   <tag k=\"surface\" v=\"asphalt\"/>\n  </way>\n </modify>\n</osmChange>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:39 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "9c68cf67-51e0-44e5-850b-4470024a49d3",
+  "insertionIndex": 9
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-de271621-dcda-4355-af16-1121284cab60.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-de271621-dcda-4355-af16-1121284cab60.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-de271621-dcda-4355-af16-1121284cab60.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "de271621-dcda-4355-af16-1121284cab60",
+  "name": "0.6_nodes",
+  "request": {
+    "url": "/0.6/nodes?nodes=142038322v4,4031337551v1,257553745v2,490699158v1,4031337541v1,4031337543v1,4031337542v1,4031338294v1",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"CGImap 0.9.0 (3127504 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <node id=\"142038322\" visible=\"true\" version=\"4\" changeset=\"2422888\" timestamp=\"2009-09-09T10:02:24Z\" user=\"moyogo\" uid=\"246\" lat=\"50.8364781\" lon=\"4.3560092\"/>\n <node id=\"257553745\" visible=\"true\" version=\"2\" changeset=\"2422888\" timestamp=\"2009-09-09T10:02:21Z\" user=\"moyogo\" uid=\"246\" lat=\"50.8372587\" lon=\"4.3581549\"/>\n <node id=\"490699158\" visible=\"true\" version=\"1\" changeset=\"2422888\" timestamp=\"2009-09-09T10:02:27Z\" user=\"moyogo\" uid=\"246\" lat=\"50.8364239\" lon=\"4.3561551\"/>\n <node id=\"4031337541\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364152\" lon=\"4.3560587\"/>\n <node id=\"4031337542\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364178\" lon=\"4.3560372\"/>\n <node id=\"4031337543\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364246\" lon=\"4.3560198\"/>\n <node id=\"4031337551\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364563\" lon=\"4.3559820\">\n  <tag k=\"highway\" v=\"give_way\"/>\n </node>\n <node id=\"4031338294\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:50Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8372120\" lon=\"4.3579899\"/>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:41 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "de271621-dcda-4355-af16-1121284cab60",
+  "insertionIndex": 5
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-f46384a6-d001-42c0-a70d-b64bc4cc4004.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-f46384a6-d001-42c0-a70d-b64bc4cc4004.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_nodes-f46384a6-d001-42c0-a70d-b64bc4cc4004.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "f46384a6-d001-42c0-a70d-b64bc4cc4004",
+  "name": "0.6_nodes",
+  "request": {
+    "url": "/0.6/nodes?nodes=142038322,4031337551,257553745,490699158,4031337541,4031337543,4031338294,4031337542",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"CGImap 0.9.0 (3829092 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <node id=\"142038322\" visible=\"true\" version=\"5\" changeset=\"37500705\" timestamp=\"2016-02-28T15:23:08Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364706\" lon=\"4.3559661\"/>\n <node id=\"257553745\" visible=\"true\" version=\"3\" changeset=\"37500705\" timestamp=\"2016-02-28T15:23:09Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8372364\" lon=\"4.3581014\"/>\n <node id=\"490699158\" visible=\"true\" version=\"2\" changeset=\"37500705\" timestamp=\"2016-02-28T15:23:10Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364215\" lon=\"4.3560923\"/>\n <node id=\"4031337541\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364152\" lon=\"4.3560587\"/>\n <node id=\"4031337542\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364178\" lon=\"4.3560372\"/>\n <node id=\"4031337543\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364246\" lon=\"4.3560198\"/>\n <node id=\"4031337551\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:49Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8364563\" lon=\"4.3559820\">\n  <tag k=\"highway\" v=\"give_way\"/>\n </node>\n <node id=\"4031338294\" visible=\"true\" version=\"1\" changeset=\"37500705\" timestamp=\"2016-02-28T15:22:50Z\" user=\"AtonX\" uid=\"383309\" lat=\"50.8372120\" lon=\"4.3579899\"/>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:40 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "f46384a6-d001-42c0-a70d-b64bc4cc4004",
+  "insertionIndex": 7
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-1d794d03-79cb-435c-a041-f16e3a3b0c3e.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-1d794d03-79cb-435c-a041-f16e3a3b0c3e.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-1d794d03-79cb-435c-a041-f16e3a3b0c3e.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "1d794d03-79cb-435c-a041-f16e3a3b0c3e",
+  "name": "0.6_ways",
+  "request": {
+    "url": "/0.6/ways?ways=40487768v6",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"CGImap 0.9.0 (1693284 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <way id=\"40487768\" visible=\"true\" version=\"6\" changeset=\"132026961\" timestamp=\"2023-02-03T05:06:00Z\" user=\"RaphaelPasloin_mobile\" uid=\"16794559\">\n  <nd ref=\"257553745\"/>\n  <nd ref=\"4031338294\"/>\n  <nd ref=\"490699158\"/>\n  <nd ref=\"4031337541\"/>\n  <nd ref=\"4031337542\"/>\n  <nd ref=\"4031337543\"/>\n  <nd ref=\"4031337551\"/>\n  <nd ref=\"142038322\"/>\n  <tag k=\"highway\" v=\"service\"/>\n  <tag k=\"lit\" v=\"yes\"/>\n  <tag k=\"maxspeed\" v=\"30\"/>\n  <tag k=\"name\" v=\"Boulevard de Waterloo - Waterloolaan\"/>\n  <tag k=\"name:fr\" v=\"Boulevard de Waterloo\"/>\n  <tag k=\"name:nl\" v=\"Waterloolaan\"/>\n  <tag k=\"oneway\" v=\"yes\"/>\n  <tag k=\"service\" v=\"parking_aisle\"/>\n  <tag k=\"source:maxspeed\" v=\"BE-BRU:urban\"/>\n </way>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:41 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "1d794d03-79cb-435c-a041-f16e3a3b0c3e",
+  "insertionIndex": 6
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-bc252594-155c-417a-9e37-093c523bd23f.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-bc252594-155c-417a-9e37-093c523bd23f.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/0.6_ways-bc252594-155c-417a-9e37-093c523bd23f.json	(revision 36233)
@@ -0,0 +1,23 @@
+{
+  "id": "bc252594-155c-417a-9e37-093c523bd23f",
+  "name": "0.6_ways",
+  "request": {
+    "url": "/0.6/ways?ways=40487768",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"CGImap 0.9.0 (3076619 spike-06.openstreetmap.org)\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n <way id=\"40487768\" visible=\"true\" version=\"7\" changeset=\"149181932\" timestamp=\"2024-03-26T14:55:59Z\" user=\"bxl-forever\" uid=\"2644288\">\n  <nd ref=\"257553745\"/>\n  <nd ref=\"4031338294\"/>\n  <nd ref=\"490699158\"/>\n  <nd ref=\"4031337541\"/>\n  <nd ref=\"4031337542\"/>\n  <nd ref=\"4031337543\"/>\n  <nd ref=\"4031337551\"/>\n  <nd ref=\"142038322\"/>\n  <tag k=\"highway\" v=\"service\"/>\n  <tag k=\"lit\" v=\"yes\"/>\n  <tag k=\"maxspeed\" v=\"30\"/>\n  <tag k=\"name\" v=\"Boulevard de Waterloo - Waterloolaan\"/>\n  <tag k=\"name:fr\" v=\"Boulevard de Waterloo\"/>\n  <tag k=\"name:nl\" v=\"Waterloolaan\"/>\n  <tag k=\"oneway\" v=\"yes\"/>\n  <tag k=\"service\" v=\"parking_aisle\"/>\n  <tag k=\"source:maxspeed\" v=\"BE-BRU:urban\"/>\n  <tag k=\"surface\" v=\"asphalt\"/>\n </way>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "private, max-age=0, must-revalidate",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:39 GMT",
+      "Content-Type": "application/xml; charset=utf-8"
+    }
+  },
+  "uuid": "bc252594-155c-417a-9e37-093c523bd23f",
+  "insertionIndex": 8
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/capabilities-09c1dd2c-032b-4ba8-923f-86ebc1d68234.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/capabilities-09c1dd2c-032b-4ba8-923f-86ebc1d68234.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/mappings/capabilities-09c1dd2c-032b-4ba8-923f-86ebc1d68234.json	(revision 36233)
@@ -0,0 +1,36 @@
+{
+  "id": "09c1dd2c-032b-4ba8-923f-86ebc1d68234",
+  "name": "capabilities",
+  "request": {
+    "url": "/capabilities",
+    "method": "GET"
+  },
+  "response": {
+    "status": 200,
+    "body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<osm version=\"0.6\" generator=\"OpenStreetMap server\" copyright=\"OpenStreetMap and contributors\" attribution=\"http://www.openstreetmap.org/copyright\" license=\"http://opendatacommons.org/licenses/odbl/1-0/\">\n  <api>\n    <version minimum=\"0.6\" maximum=\"0.6\"/>\n    <area maximum=\"0.25\"/>\n    <note_area maximum=\"25\"/>\n    <tracepoints per_page=\"5000\"/>\n    <waynodes maximum=\"2000\"/>\n    <relationmembers maximum=\"32000\"/>\n    <changesets maximum_elements=\"10000\" default_query_limit=\"100\" maximum_query_limit=\"100\"/>\n    <notes default_query_limit=\"100\" maximum_query_limit=\"10000\"/>\n    <timeout seconds=\"300\"/>\n    <status database=\"online\" api=\"online\" gpx=\"online\"/>\n  </api>\n  <policy>\n    <imagery>\n      <blacklist regex=\".*\\.google(apis)?\\..*/.*\"/>\n      <blacklist regex=\"http://xdworld\\.vworld\\.kr:8080/.*\"/>\n      <blacklist regex=\".*\\.here\\.com[/:].*\"/>\n      <blacklist regex=\".*\\.mapy\\.cz.*\"/>\n      <blacklist regex=\".*\\.api-maps\\.yandex\\.ru/.*\"/>\n      <blacklist regex=\".*\\.maps\\.yandex\\.net/.*\"/>\n    </imagery>\n  </policy>\n</osm>\n",
+    "headers": {
+      "Keep-Alive": "timeout=5, max=100",
+      "Status": "200 OK",
+      "Server": "Apache/2.4.54 (Ubuntu)",
+      "X-Request-Id": "ZgVb5h3no4a_hpCu96UYmwAAAQA",
+      "vary": "Origin,Accept-Encoding",
+      "X-Content-Type-Options": "nosniff",
+      "X-Runtime": "0.010043",
+      "X-Download-Options": "noopen",
+      "X-Permitted-Cross-Domain-Policies": "none",
+      "Upgrade": "h2,h2c",
+      "Date": "Thu, 28 Mar 2024 12:00:38 GMT",
+      "X-Frame-Options": "sameorigin",
+      "Referrer-Policy": "strict-origin-when-cross-origin",
+      "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
+      "Cache-Control": "max-age=0, private, must-revalidate",
+      "ETag": "W/\"4e52db1602d669b7131cbdf3fa1f9669-gzip\"",
+      "Content-Security-Policy": "default-src 'self'; child-src 'self'; connect-src 'self' matomo.openstreetmap.org; font-src 'none'; form-action 'self'; frame-ancestors 'self'; frame-src 'self'; img-src 'self' data: www.gravatar.com *.wp.com tile.openstreetmap.org *.tile.openstreetmap.org *.tile.thunderforest.com tile.tracestrack.com *.openstreetmap.fr matomo.openstreetmap.org https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com https://openstreetmap-gps-images.s3.dualstack.eu-west-1.amazonaws.com; manifest-src 'self'; media-src 'none'; object-src 'self'; script-src 'self' matomo.openstreetmap.org; style-src 'self'; worker-src 'none'",
+      "X-XSS-Protection": "1; mode=block",
+      "Content-Type": "application/xml; charset=utf-8",
+      "X-Powered-By": "Phusion Passenger(R) 6.0.20"
+    }
+  },
+  "uuid": "09c1dd2c-032b-4ba8-923f-86ebc1d68234",
+  "insertionIndex": 11
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/nodes.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/nodes.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/nodes.json	(revision 36233)
@@ -0,0 +1,177 @@
+{
+  "version": "0.6",
+  "generator": "CGImap 0.9.0 (3829092 spike-06.openstreetmap.org)",
+  "copyright": "OpenStreetMap and contributors",
+  "attribution": "http://www.openstreetmap.org/copyright",
+  "license": "http://opendatacommons.org/licenses/odbl/1-0/",
+  "elements": [
+    {
+      "type": "node",
+      "id": 142038322,
+      "lat": 50.8364414,
+      "lon": 4.3559474,
+      "timestamp": "2007-11-29T16:38:36Z",
+      "version": 1,
+      "changeset": 645634,
+      "user": "PhilippeP",
+      "uid": 7791
+    },
+    {
+      "type": "node",
+      "id": 142038322,
+      "lat": 50.8364414,
+      "lon": 4.3559474,
+      "timestamp": "2007-11-29T16:45:48Z",
+      "version": 2,
+      "changeset": 645634,
+      "user": "PhilippeP",
+      "uid": 7791
+    },
+    {
+      "type": "node",
+      "id": 142038322,
+      "lat": 50.8364414,
+      "lon": 4.3559474,
+      "timestamp": "2009-02-23T22:00:33Z",
+      "version": 3,
+      "changeset": 647875,
+      "user": "La pinte",
+      "uid": 101763
+    },
+    {
+      "type": "node",
+      "id": 142038322,
+      "lat": 50.8364781,
+      "lon": 4.3560092,
+      "timestamp": "2009-09-09T10:02:24Z",
+      "version": 4,
+      "changeset": 2422888,
+      "user": "moyogo",
+      "uid": 246
+    },
+    {
+      "type": "node",
+      "id": 142038322,
+      "lat": 50.8364706,
+      "lon": 4.3559661,
+      "timestamp": "2016-02-28T15:23:08Z",
+      "version": 5,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 257553745,
+      "lat": 50.8372658,
+      "lon": 4.3581507,
+      "timestamp": "2008-04-14T15:02:35Z",
+      "version": 1,
+      "changeset": 143403,
+      "user": "moyogo",
+      "uid": 246
+    },
+    {
+      "type": "node",
+      "id": 257553745,
+      "lat": 50.8372587,
+      "lon": 4.3581549,
+      "timestamp": "2009-09-09T10:02:21Z",
+      "version": 2,
+      "changeset": 2422888,
+      "user": "moyogo",
+      "uid": 246
+    },
+    {
+      "type": "node",
+      "id": 257553745,
+      "lat": 50.8372364,
+      "lon": 4.3581014,
+      "timestamp": "2016-02-28T15:23:09Z",
+      "version": 3,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 4031337541,
+      "lat": 50.8364152,
+      "lon": 4.3560587,
+      "timestamp": "2016-02-28T15:22:49Z",
+      "version": 1,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 4031337542,
+      "lat": 50.8364178,
+      "lon": 4.3560372,
+      "timestamp": "2016-02-28T15:22:49Z",
+      "version": 1,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 4031337543,
+      "lat": 50.8364246,
+      "lon": 4.3560198,
+      "timestamp": "2016-02-28T15:22:49Z",
+      "version": 1,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 4031337551,
+      "lat": 50.8364563,
+      "lon": 4.3559820,
+      "timestamp": "2016-02-28T15:22:49Z",
+      "version": 1,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309,
+      "tags": {
+        "highway": "give_way"
+      }
+    },
+    {
+      "type": "node",
+      "id": 4031338294,
+      "lat": 50.8372120,
+      "lon": 4.3579899,
+      "timestamp": "2016-02-28T15:22:50Z",
+      "version": 1,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    },
+    {
+      "type": "node",
+      "id": 490699158,
+      "lat": 50.8364239,
+      "lon": 4.3561551,
+      "timestamp": "2009-09-09T10:02:27Z",
+      "version": 1,
+      "changeset": 2422888,
+      "user": "moyogo",
+      "uid": 246
+    },
+    {
+      "type": "node",
+      "id": 490699158,
+      "lat": 50.8364215,
+      "lon": 4.3560923,
+      "timestamp": "2016-02-28T15:23:10Z",
+      "version": 2,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309
+    }
+  ]
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/23582/ways.json
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/23582/ways.json	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/23582/ways.json	(revision 36233)
@@ -0,0 +1,197 @@
+{
+  "version": "0.6",
+  "generator": "CGImap 0.9.0 (2113908 spike-08.openstreetmap.org)",
+  "copyright": "OpenStreetMap and contributors",
+  "attribution": "http://www.openstreetmap.org/copyright",
+  "license": "http://opendatacommons.org/licenses/odbl/1-0/",
+  "elements": [
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2009-09-09T10:02:27Z",
+      "version": 1,
+      "changeset": 2422888,
+      "user": "moyogo",
+      "uid": 246,
+      "nodes": [
+        257553745,
+        490699158,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "true",
+        "service": "parking"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2013-01-07T22:47:24Z",
+      "version": 2,
+      "changeset": 14569019,
+      "user": "eMerzh",
+      "uid": 15399,
+      "nodes": [
+        257553745,
+        490699158,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2016-02-28T15:23:02Z",
+      "version": 3,
+      "changeset": 37500705,
+      "user": "AtonX",
+      "uid": 383309,
+      "nodes": [
+        257553745,
+        4031338294,
+        490699158,
+        4031337541,
+        4031337542,
+        4031337543,
+        4031337551,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2016-09-28T22:42:06Z",
+      "version": 4,
+      "changeset": 42506693,
+      "user": "Glenn Plas",
+      "uid": 497567,
+      "nodes": [
+        257553745,
+        4031338294,
+        490699158,
+        4031337541,
+        4031337542,
+        4031337543,
+        4031337551,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking_aisle"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2020-12-16T19:07:47Z",
+      "version": 5,
+      "changeset": 95959881,
+      "user": "bxl-forever",
+      "uid": 2644288,
+      "nodes": [
+        257553745,
+        4031338294,
+        490699158,
+        4031337541,
+        4031337542,
+        4031337543,
+        4031337551,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "maxspeed": "30",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking_aisle",
+        "source:maxspeed": "BE-BRU:urban"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2023-02-03T05:06:00Z",
+      "version": 6,
+      "changeset": 132026961,
+      "user": "RaphaelPasloin_mobile",
+      "uid": 16794559,
+      "nodes": [
+        257553745,
+        4031338294,
+        490699158,
+        4031337541,
+        4031337542,
+        4031337543,
+        4031337551,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "lit": "yes",
+        "maxspeed": "30",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking_aisle",
+        "source:maxspeed": "BE-BRU:urban"
+      }
+    },
+    {
+      "type": "way",
+      "id": 40487768,
+      "timestamp": "2024-03-26T14:55:59Z",
+      "version": 7,
+      "changeset": 149181932,
+      "user": "bxl-forever",
+      "uid": 2644288,
+      "nodes": [
+        257553745,
+        4031338294,
+        490699158,
+        4031337541,
+        4031337542,
+        4031337543,
+        4031337551,
+        142038322
+      ],
+      "tags": {
+        "highway": "service",
+        "lit": "yes",
+        "maxspeed": "30",
+        "name": "Boulevard de Waterloo - Waterloolaan",
+        "name:fr": "Boulevard de Waterloo",
+        "name:nl": "Waterloolaan",
+        "oneway": "yes",
+        "service": "parking_aisle",
+        "source:maxspeed": "BE-BRU:urban",
+        "surface": "asphalt"
+      }
+    }
+  ]
+}
Index: /applications/editors/josm/plugins/reverter/test/data/regress/README.md
===================================================================
--- /applications/editors/josm/plugins/reverter/test/data/regress/README.md	(revision 36233)
+++ /applications/editors/josm/plugins/reverter/test/data/regress/README.md	(revision 36233)
@@ -0,0 +1,22 @@
+# Regression Readme
+## Generating nodes.json, ways.json, and relations.json
+In order to generate these jsons, you will want a list of the objects. You can
+get this by selecting the objects in JOSM and copying them.
+
+Example:
+
+```
+node 1
+node 2
+```
+
+Once you have the list, you can run the following command:
+```shell
+# Note: `pbpaste` is for mac, `xclip -selection clipboard -o` is for x11 linux, and `wl-paste` (from `wl-clipboard`) is for linux wayland
+$ wl-paste | \
+  awk '{print "https://api.openstreetmap.org/api/0.6/$1/" $2 "/history.json" " -o " $1 "_" $2 ".json"}' | \
+  xargs curl -L
+$ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' node_*.json > nodes.json
+$ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' way_*.json > ways.json
+$ jq -s '.[0].elements=([.[].elements]|flatten)|.[0]' relation_*.json > relations.json
+```
Index: /applications/editors/josm/plugins/reverter/test/unit/reverter/ChangesetReverterTest.java
===================================================================
--- /applications/editors/josm/plugins/reverter/test/unit/reverter/ChangesetReverterTest.java	(revision 36232)
+++ /applications/editors/josm/plugins/reverter/test/unit/reverter/ChangesetReverterTest.java	(revision 36233)
@@ -4,4 +4,6 @@
 import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -21,11 +23,26 @@
 import java.util.stream.Collectors;
 
-import jakarta.json.Json;
-import jakarta.json.JsonArray;
-import jakarta.json.JsonNumber;
-import jakarta.json.JsonObject;
-import jakarta.json.JsonReader;
-import jakarta.json.JsonString;
-import jakarta.json.JsonValue;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
+import org.openstreetmap.josm.actions.downloadtasks.DownloadParams;
+import org.openstreetmap.josm.data.UndoRedoHandler;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.data.osm.PrimitiveId;
+import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.HTTP;
+import org.openstreetmap.josm.testutils.annotations.Main;
+import org.openstreetmap.josm.testutils.annotations.Projection;
+import org.openstreetmap.josm.tools.JosmRuntimeException;
+import org.openstreetmap.josm.tools.Logging;
 
 import com.github.tomakehurst.wiremock.client.WireMock;
@@ -38,22 +55,11 @@
 import com.github.tomakehurst.wiremock.junit5.WireMockExtension;
 import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
-import org.openstreetmap.josm.actions.downloadtasks.DownloadParams;
-import org.openstreetmap.josm.data.UndoRedoHandler;
-import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
-import org.openstreetmap.josm.data.osm.PrimitiveId;
-import org.openstreetmap.josm.data.osm.SimplePrimitiveId;
-import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.gui.util.GuiHelper;
-import org.openstreetmap.josm.spi.preferences.Config;
-import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
-import org.openstreetmap.josm.testutils.annotations.HTTP;
-import org.openstreetmap.josm.tools.JosmRuntimeException;
-import org.openstreetmap.josm.tools.Logging;
+import jakarta.json.Json;
+import jakarta.json.JsonArray;
+import jakarta.json.JsonNumber;
+import jakarta.json.JsonObject;
+import jakarta.json.JsonReader;
+import jakarta.json.JsonString;
+import jakarta.json.JsonValue;
 
 /**
@@ -62,4 +68,6 @@
 @BasicPreferences
 @HTTP
+@Main
+@Projection
 class ChangesetReverterTest {
     @RegisterExtension
@@ -74,7 +82,7 @@
     void testTicket22520(WireMockRuntimeInfo wireMockRuntimeInfo) throws ExecutionException, InterruptedException {
         wireMockRuntimeInfo.getWireMock().loadMappingsFrom(TestUtils.getRegressionDataDir(22520));
-        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/nodes")).willReturn(WireMock.aResponse().withTransformers("MultiplePrimitiveTransformer")));
-        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/relations")).willReturn(WireMock.aResponse().withTransformers("MultiplePrimitiveTransformer")));
-        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/ways")).willReturn(WireMock.aResponse().withTransformers("MultiplePrimitiveTransformer")));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/nodes")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 22520)));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/relations")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 22520)));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/ways")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 22520)));
         Config.getPref().put("osm-server.url", wireMockRuntimeInfo.getHttpBaseUrl());
         PrimitiveId building = new SimplePrimitiveId(233056719, OsmPrimitiveType.WAY);
@@ -90,4 +98,24 @@
 
     /**
+     * Non-regression test for #23582: Nodes that were not modified by a changeset should not be reverted.
+     * Note: This might not be the intended behavior, but it was the behavior prior to r36230.
+     */
+    @Test
+    void testTicket23582(WireMockRuntimeInfo wireMockRuntimeInfo) {
+        wireMockRuntimeInfo.getWireMock().loadMappingsFrom(TestUtils.getRegressionDataDir(23582));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/nodes")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 23582)));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/relations")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 23582)));
+        wireMockRuntimeInfo.getWireMock().register(WireMock.get(WireMock.urlPathMatching("/0.6/ways")).willReturn(WireMock.aResponse().withTransformer("MultiplePrimitiveTransformer", "ticket", 23582)));
+        Config.getPref().put("osm-server.url", wireMockRuntimeInfo.getHttpBaseUrl());
+        final RevertChangesetTask task = new RevertChangesetTask(149181932, ChangesetReverter.RevertType.FULL, true, true);
+        task.run();
+        GuiHelper.runInEDTAndWait(() -> { /* Sync UI thread (some actions are taken on this thread which modify primitives) */ });
+        final DataSet reverted = MainApplication.getLayerManager().getEditDataSet();
+        assertEquals(1, reverted.allModifiedPrimitives().size());
+        final Way oldWay = assertInstanceOf(Way.class, reverted.allModifiedPrimitives().iterator().next());
+        assertEquals(8, oldWay.getNodesCount());
+    }
+
+    /**
      * A transformer for the /nodes?node, /ways?ways, and /relations?relations endpoints. This is needed since we don't always do the requests in the same order.
      */
@@ -100,13 +128,14 @@
         @Override
         public Response transform(Request request, Response response, FileSource files, Parameters parameters) {
+            final int ticket = parameters.getInt("ticket");
             final QueryParameter wayParam = request.queryParameter("ways");
             final QueryParameter nodeParam = request.queryParameter("nodes");
             final QueryParameter relParam = request.queryParameter("relations");
             if (wayParam.isPresent()) {
-                return Response.Builder.like(response).but().body(getReturnXml(OsmPrimitiveType.WAY, wayParam)).build();
+                return Response.Builder.like(response).but().body(getReturnXml(ticket, OsmPrimitiveType.WAY, wayParam)).build();
             } else if (nodeParam.isPresent()) {
-                return Response.Builder.like(response).but().body(getReturnXml(OsmPrimitiveType.NODE, nodeParam)).build();
+                return Response.Builder.like(response).but().body(getReturnXml(ticket, OsmPrimitiveType.NODE, nodeParam)).build();
             } else if (relParam.isPresent()) {
-                return Response.Builder.like(response).but().body(getReturnXml(OsmPrimitiveType.RELATION, relParam)).build();
+                return Response.Builder.like(response).but().body(getReturnXml(ticket, OsmPrimitiveType.RELATION, relParam)).build();
             } else {
                 IllegalArgumentException e = new IllegalArgumentException("No query parameter present");
@@ -121,5 +150,5 @@
         }
 
-        private static String getReturnXml(OsmPrimitiveType type, QueryParameter parameter) {
+        private static String getReturnXml(int ticket, OsmPrimitiveType type, QueryParameter parameter) {
             final String file;
             switch (type) {
@@ -140,5 +169,5 @@
                     : parameter.values())
                     .stream().map(s -> new OsmParameterInformation(type, s)).collect(Collectors.toSet());
-            try (InputStream fis = Files.newInputStream(Paths.get(TestUtils.getRegressionDataDir(22520), file));
+            try (InputStream fis = Files.newInputStream(Paths.get(TestUtils.getRegressionDataDir(ticket), file));
                  JsonReader reader = Json.createReader(fis)) {
                 String version = "0.6";
