Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 18792)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 18793)
@@ -124,5 +124,4 @@
     private final TagEditorPanel tagEditorPanel;
     private final ReferringRelationsBrowser referrerBrowser;
-    private final ReferringRelationsBrowserModel referrerModel;
 
     /** the member table and its model */
@@ -154,16 +153,4 @@
     private final SelectAction selectAction;
     /**
-     * Action for performing the {@link DuplicateRelationAction}
-     */
-    private final DuplicateRelationAction duplicateAction;
-    /**
-     * Action for performing the {@link DeleteCurrentRelationAction}
-     */
-    private final DeleteCurrentRelationAction deleteAction;
-    /**
-     * Action for performing the {@link OKAction}
-     */
-    private final OKAction okAction;
-    /**
      * Action for performing the {@link CancelAction}
      */
@@ -175,10 +162,10 @@
 
     private Component selectedTabPane;
-    private JTabbedPane tabbedPane;
+    private final JTabbedPane tabbedPane;
 
     /**
      * Creates a new relation editor for the given relation. The relation will be saved if the user
      * selects "ok" in the editor.
-     *
+     * <p>
      * If no relation is given, will create an editor for a new relation.
      *
@@ -202,7 +189,5 @@
             @Override
             public Collection<OsmPrimitive> getSelection() {
-                Relation relation = new Relation();
-                tagEditorPanel.getModel().applyToPrimitive(relation);
-                return Collections.<OsmPrimitive>singletonList(relation);
+                return Collections.singletonList(getRelation());
             }
         };
@@ -214,5 +199,5 @@
         selectionTableModel = new SelectionTableModel(getLayer());
         selectionTableModel.register();
-        referrerModel = new ReferringRelationsBrowserModel(relation);
+        ReferringRelationsBrowserModel referrerModel = new ReferringRelationsBrowserModel(relation);
 
         tagEditorPanel = new TagEditorPanel(relation, presetHandler);
@@ -271,6 +256,8 @@
         applyAction = new ApplyAction(actionAccess);
         selectAction = new SelectAction(actionAccess);
-        duplicateAction = new DuplicateRelationAction(actionAccess);
-        deleteAction = new DeleteCurrentRelationAction(actionAccess);
+        // Action for performing the {@link DuplicateRelationAction}
+        final DuplicateRelationAction duplicateAction = new DuplicateRelationAction(actionAccess);
+        // Action for performing the {@link DeleteCurrentRelationAction}
+        final DeleteCurrentRelationAction deleteAction = new DeleteCurrentRelationAction(actionAccess);
 
         this.memberTableModel.addTableModelListener(applyAction);
@@ -279,5 +266,6 @@
         addPropertyChangeListener(deleteAction);
 
-        okAction = new OKAction(actionAccess);
+        // Action for performing the {@link OKAction}
+        final OKAction okAction = new OKAction(actionAccess);
         cancelAction = new CancelAction(actionAccess);
 
@@ -518,5 +506,5 @@
      * @return the panel for the relation member editor
      */
-    protected static JPanel buildMemberEditorPanel(
+    static JPanel buildMemberEditorPanel(
             LeftButtonToolbar leftButtonToolbar, IRelationEditorActionAccess editorAccess) {
         final JPanel pnl = new JPanel(new GridBagLayout());
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 18792)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 18793)
@@ -5,5 +5,7 @@
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
+import java.util.Collection;
 import java.util.Collections;
 
@@ -11,6 +13,8 @@
 import javax.swing.JPanel;
 
+import mockit.Mock;
+import mockit.MockUp;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
+import org.junit.platform.commons.support.ReflectionSupport;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -19,24 +23,20 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.dialogs.relation.actions.IRelationEditorActionAccess;
+import org.openstreetmap.josm.gui.dialogs.relation.actions.PasteMembersAction;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.tagging.TagEditorPanel;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingTextField;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetHandler;
+import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
+import org.openstreetmap.josm.testutils.annotations.Main;
 import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
  * Unit tests of {@link GenericRelationEditor} class.
  */
+@BasicPreferences
+@Main
 public class GenericRelationEditorTest {
-
-    /**
-     * Setup test.
-     */
-    @RegisterExtension
-    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().main();
-
     /**
      * Returns a new relation editor for unit tests.
@@ -133,3 +133,29 @@
         assertNotNull(tagEditorPanel.getModel());
     }
+
+    @Test
+    void testNonRegression23091() throws Exception {
+        new MockUp<PasteMembersAction>() {
+            @Mock
+            protected void updateEnabledState() {
+                // Do nothing
+            }
+        };
+
+        DataSet ds = new DataSet();
+        Relation relation = new Relation(1);
+        ds.addPrimitive(relation);
+        OsmDataLayer layer = new OsmDataLayer(ds, "test", null);
+
+        final GenericRelationEditor gr = new GenericRelationEditor(layer, relation, Collections.emptyList());
+        final IRelationEditorActionAccess iAccess = (IRelationEditorActionAccess)
+                ReflectionSupport.tryToReadFieldValue(GenericRelationEditor.class.getDeclaredField("actionAccess"), gr)
+                        .get();
+        final TaggingPresetHandler handler = (TaggingPresetHandler)
+                ReflectionSupport.tryToReadFieldValue(MemberTableModel.class.getDeclaredField("presetHandler"), iAccess.getMemberTableModel())
+                        .get();
+        final Collection<OsmPrimitive> selection = handler.getSelection();
+        assertEquals(1, selection.size());
+        assertSame(relation, selection.iterator().next(), "The selection should be the same");
+    }
 }
