Index: src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 19106)
+++ src/org/openstreetmap/josm/actions/CombineWayAction.java	(working copy)
@@ -10,12 +10,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Objects;
-import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
@@ -22,6 +20,7 @@
 import javax.swing.JOptionPane;
 
 import org.openstreetmap.josm.actions.corrector.ReverseWayTagCorrector;
+import org.openstreetmap.josm.actions.downloadtasks.DownloadReferrersTask;
 import org.openstreetmap.josm.command.ChangeNodesCommand;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.DeleteCommand;
@@ -58,6 +57,7 @@
 public class CombineWayAction extends JosmAction {
 
     private static final BooleanProperty PROP_REVERSE_WAY = new BooleanProperty("tag-correction.reverse-way", true);
+    private static final BooleanProperty PROP_DOWNLOAD_PARENTS = new BooleanProperty("combine.download-parents", false);
 
     /**
      * Constructs a new {@code CombineWayAction}.
@@ -279,20 +279,6 @@
             return;
         }
 
-        // see #18083: check if we will combine ways at nodes outside of the download area
-        Set<Node> endNodesOutside = new HashSet<>();
-        for (Way w : selectedWays) {
-            final Node[] endnodes = {w.firstNode(), w.lastNode()};
-            for (Node n : endnodes) {
-                if (!n.isNew() && !n.isReferrersDownloaded() && !endNodesOutside.add(n)) {
-                    new Notification(tr("Combine ways refused<br>" + "(A shared node may have additional referrers)"))
-                            .setIcon(JOptionPane.INFORMATION_MESSAGE).show();
-                    return;
-
-                }
-            }
-        }
-
         // combine and update gui
         Pair<Way, Command> combineResult;
         try {
@@ -304,6 +290,19 @@
 
         if (combineResult == null)
             return;
+        // see #18083 and #23735: check if we know the parents of the combined ways
+        Collection<OsmPrimitive> missingParents = selectedWays.stream().filter(w -> !w.isReferrersDownloaded())
+                .collect(Collectors.toList());
+        if (!missingParents.isEmpty() && Boolean.TRUE.equals(PROP_DOWNLOAD_PARENTS.get())
+                && event.getSource() != this) { // avoid endless recursion
+            MainApplication.worker.submit(() -> {
+                new DownloadReferrersTask(getLayerManager().getEditLayer(), missingParents).run();
+                GuiHelper.runInEDT(() -> actionPerformed(new ActionEvent(this, 0, null)));
+            });
+            return;
+        }
+        if (!checkAndConfirmCombineOutlyingWays(selectedWays))
+            return;
 
         final Way selectedWay = combineResult.a;
         UndoRedoHandler.getInstance().add(combineResult.b);
@@ -346,4 +345,27 @@
         setEnabled(numWays >= 2);
     }
 
+    /**
+     * Check whether user is about to combine ways with unknown parents.
+     * Request confirmation if he is.
+     * @param ways the primitives to operate on
+     * @return true, if operating on outlying primitives is OK; false, otherwise
+     */
+    private static boolean checkAndConfirmCombineOutlyingWays(Collection<Way> ways) {
+        DownloadReferrersAction action = MainApplication.getMenu().downloadReferrers;
+        final String downloadHint = tr("You should use {0}->{1}({2}) first.",
+                MainApplication.getMenu().editMenu.getText(), action.getValue(NAME), action.getShortcut().toString());
+        return Boolean.TRUE.equals(GuiHelper.runInEDTAndWaitAndReturn(() -> checkAndConfirmOutlyingOperation("combine",
+                tr("Combine confirmation"),
+                tr("You are about to combine ways which can be members of relations not yet downloaded."
+                        + "<br>"
+                        + "This can lead to damaging these parent relations (that you do not see)."
+                        + "<br>"
+                        + "{0}"
+                        + "<br><br>"
+                        + "Do you really want to combine without downloading?", downloadHint),
+                "", // not used, we never combine incomplete ways
+                ways, Collections.emptyList())));
+    }
+
 }
