diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
index d844969..b58037e 100644
--- a/core/modules/views/src/Plugin/views/PluginBase.php
+++ b/core/modules/views/src/Plugin/views/PluginBase.php
@@ -382,7 +382,10 @@ protected function viewsTokenReplace($text, $tokens) {
           assert('preg_match(\'/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/\', $key) === 1', 'Tokens need to be valid Twig variables.');
           $token_array = array($key => $token_array);
         }
-        $twig_tokens[$top] = $token_array;
+        if (!isset($twig_tokens[$top])) {
+          $twig_tokens[$top] = [];
+        }
+        $twig_tokens[$top] += $token_array;
       }
     }
 
diff --git a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
index 0ef1724..cb79434 100644
--- a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
+++ b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php
@@ -44,6 +44,20 @@ public function testViewsTokenReplace() {
   }
 
   /**
+   * Test that the token replacement in views works correctly with dots.
+   */
+  public function testViewsTokenReplaceWithDots() {
+    $text = '{{ argument.first }} comes before {{ argument.second }}';
+    $tokens = ['{{ argument.first }}' => 'first', '{{ argument.second }}' => 'second'];
+
+    $result = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($text, $tokens) {
+      return $this->testPluginBase->viewsTokenReplace($text, $tokens);
+    });
+
+    $this->assertIdentical($result, 'first comes before second');
+  }
+
+  /**
    * Tests viewsTokenReplace without any twig tokens.
    */
   public function testViewsTokenReplaceWithTwigTokens() {
