Index: src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 18360)
+++ src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(working copy)
@@ -575,7 +575,7 @@
      * Key: Registered name (property "toolbar" of action).
      * Value: The action to execute.
      */
-    private final Map<String, Action> actions = new ConcurrentHashMap<>();
+    private final Map<String, Action> actionsInMenu = new ConcurrentHashMap<>();
     private final Map<String, Action> regactions = new ConcurrentHashMap<>();
 
     private final DefaultMutableTreeNode rootActionsNode = new DefaultMutableTreeNode(tr("Actions"));
@@ -1051,12 +1051,12 @@
                         continue;
                     } else {
                         String toolbar = (String) tb;
-                        Action r = actions.get(toolbar);
+                        Action r = actionsInMenu.get(toolbar);
                         if (r != null && r != action && !toolbar.startsWith(IMAGERY_PREFIX)) {
                             Logging.info(tr("Toolbar action {0} overwritten: {1} gets {2}",
                             toolbar, r.getClass().getName(), action.getClass().getName()));
                         }
-                        actions.put(toolbar, action);
+                        actionsInMenu.put(toolbar, action);
                     }
                 } else {
                     userObject = menuItem.getText();
@@ -1069,10 +1069,11 @@
     }
 
     private void loadActions() {
+        actionsInMenu.clear();
         rootActionsNode.removeAllChildren();
         loadAction(rootActionsNode, MainApplication.getMenu());
         for (Map.Entry<String, Action> a : regactions.entrySet()) {
-            if (actions.get(a.getKey()) == null) {
+            if (actionsInMenu.get(a.getKey()) == null) {
                 rootActionsNode.add(new DefaultMutableTreeNode(a.getValue()));
             }
         }
@@ -1100,7 +1101,7 @@
         loadActions();
 
         Map<String, Action> allActions = new ConcurrentHashMap<>(regactions);
-        allActions.putAll(actions);
+        allActions.putAll(actionsInMenu);
         ActionParser actionParser = new ActionParser(allActions);
 
         Collection<ActionDefinition> result = new ArrayList<>();
@@ -1139,7 +1140,6 @@
             }
         }
         if (toolbar != null) {
-            actions.put(toolbar, action);
             regactions.put(toolbar, action);
         }
         return action;
@@ -1154,7 +1154,6 @@
     public Action unregister(Action action) {
         Object toolbar = action.getValue("toolbar");
         if (toolbar instanceof String) {
-            actions.remove(toolbar);
             return regactions.remove(toolbar);
         }
         return null;
