Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialogModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialogModel.java	(revision 18823)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialogModel.java	(revision 18824)
@@ -76,9 +76,9 @@
      */
     String findHashTags(String comment) {
-        String hashtags = Arrays.stream(comment.split("\\s", -1))
+        String foundHashtags = Arrays.stream(comment.split("\\s", -1))
             .map(s -> Utils.strip(s, ",;"))
             .filter(s -> s.matches("#[a-zA-Z0-9][-_a-zA-Z0-9]+"))
-            .collect(Collectors.joining(";"));
-        return hashtags.isEmpty() ? null : hashtags;
+            .distinct().collect(Collectors.joining(";"));
+        return foundHashtags.isEmpty() ? null : foundHashtags;
     }
 
@@ -96,5 +96,7 @@
                 Set<String> sanitizedHashtags = new LinkedHashSet<>();
                 for (String hashtag : hashtags.split(";", -1)) {
-                    sanitizedHashtags.add(hashtag.startsWith("#") ? hashtag : "#" + hashtag);
+                    if (comment == null || !comment.contains(hashtag)) {
+                        sanitizedHashtags.add(hashtag.startsWith("#") ? hashtag : "#" + hashtag);
+                    }
                 }
                 if (!sanitizedHashtags.isEmpty()) {
@@ -108,5 +110,5 @@
     /**
      * Inserts/updates/deletes a tag.
-     *
+     * <p>
      * Existing keys are updated. Others are added. A value of {@code null}
      * deletes the key.
@@ -131,5 +133,5 @@
     /**
      * Inserts/updates/deletes a tag.
-     *
+     * <p>
      * Existing keys are updated. Others are added. A value of {@code null}
      * deletes the key.
@@ -147,5 +149,5 @@
     /**
      * Inserts/updates/deletes all tags from {@code map}.
-     *
+     * <p>
      * Existing keys are updated. Others are added. A value of {@code null}
      * deletes the key.
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java	(revision 18823)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java	(revision 18824)
@@ -20,5 +20,4 @@
 import java.util.Set;
 import java.util.regex.Pattern;
-import java.util.stream.Collectors;
 
 import javax.swing.AbstractAction;
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java	(revision 18823)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogModelTest.java	(revision 18824)
@@ -2,24 +2,18 @@
 package org.openstreetmap.josm.gui.io;
 
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.jupiter.api.extension.RegisterExtension;
 import org.junit.jupiter.api.Test;
 
 import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.testutils.JOSMTestRules;
+import org.openstreetmap.josm.testutils.annotations.Main;
 
 /**
  * Unit tests of {@link UploadDialogModel} class.
  */
-public class UploadDialogModelTest {
-    /**
-     * Setup tests
-     */
-    @RegisterExtension
-    public JOSMTestRules test = new JOSMTestRules().preferences().main();
-
+@Main
+class UploadDialogModelTest {
     /**
      * Test of {@link UploadDialogModel}.
@@ -27,5 +21,5 @@
     @Test
     void testUploadDialogModel() {
-        assertNotNull(new UploadDialogModel());
+        assertDoesNotThrow(UploadDialogModel::new);
     }
 
@@ -65,3 +59,14 @@
     }
 
+    @Test
+    void testNonRegression23153() {
+        final DataSet dataSet = new DataSet();
+        dataSet.getChangeSetTags().put("hashtags", "duplicate");
+        final UploadDialogModel model = new UploadDialogModel();
+        final String hashTags = model.findHashTags("#duplicate #duplicate hashtag");
+        assertEquals("#duplicate", hashTags);
+        final String commentHashtags = UploadDialogModel.addHashTagsFromDataSet("There should be no " + hashTags, dataSet);
+        assertEquals("There should be no #duplicate", commentHashtags);
+    }
+
 }
