text: Title: Allow_duplicate=True Fails with More Than Two Duplicate Callbacks
  Body: ## Bug Report: `allow_duplicate=True` Fails with More Than Two Duplicate Callbacks
  
  **Description:**
  
  The `allow_duplicate=True` parameter does not function correctly when there are more than two duplicate callbacks.
  
  **Reproducible Example:**
  
  The following examples demonstrate the issue:
  
  **Working Examples (Two Duplicate Callbacks):**
  
  ```python
  # Example 1: Works
  Output("layout_ctx-train", "children")
  Input('button1', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button2', 'n_clicks'), 
  ... 
  ```
  
  ```python
  # Example 2: Works
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button1', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children")
  Input('button2', 'n_clicks'), 
  ...
  ```
  
  ```python
  # Example 3: Works
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button1', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button2', 'n_clicks'), 
  ...
  ```
  
  **Failing Examples (More Than Two Duplicate Callbacks):**
  
  ```python
  # Example 4: Fails
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button1', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children")
  Input('button2', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children")
  Input('button3', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children")
  Input('button4', 'n_clicks'), 
  ...
  ```
  
  ```python
  # Example 5: Fails
  Output("layout_ctx-train", "children")
  Input('button1', 'n_clicks'),
  ...
  
  Output("layout_ctx-train", "children")
  Input('button2', 'n_clicks'),
  ...
  
  Output("layout_ctx-train", "children")
  Input('button3', 'n_clicks'),
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button4', 'n_clicks'), 
  ...
  ```
  
  ```python
  # Example 6: Fails
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button1', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button2', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button3', 'n_clicks'), 
  ...
  
  Output("layout_ctx-train", "children", allow_duplicate=True)
  Input('button4', 'n_clicks'), 
  ...
  ```
  
  **Expected Behavior:**
  
  Duplicate callbacks should function correctly when at least one of the components has `allow_duplicate=True` set.
  
  **Additional Comments:**
  
  This functionality worked correctly in Dash version 2.9.1 for more than two duplicate callbacks as long as `allow_duplicate=True` was present on all relevant components.  The issue was encountered in Dash versions 2.17.1+.