diff --git a/core/lib/Drupal/Core/Flood/DatabaseBackend.php b/core/lib/Drupal/Core/Flood/DatabaseBackend.php
index dedb6724d7a520b9ecb9d7ef5558869656005a45..c69e29caa1d530ae4fbccb620974232c17433320 100644
--- a/core/lib/Drupal/Core/Flood/DatabaseBackend.php
+++ b/core/lib/Drupal/Core/Flood/DatabaseBackend.php
@@ -140,7 +140,9 @@ public function isAllowed($name, $threshold, $window = 3600, $identifier = NULL)
       return ($number < $threshold);
     }
     catch (\Exception $e) {
-      $this->catchException($e);
+      if (!$this->ensureTableExists()) {
+        throw $e;
+      }
       return TRUE;
     }
   }
diff --git a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
index efa545b1706f13a109abe9b9a957fecd1117d153..d784519c94922365411786c89fb1d28b6b3167fc 100644
--- a/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
+++ b/core/profiles/standard/tests/src/FunctionalJavascript/StandardPerformanceTest.php
@@ -60,7 +60,7 @@ public function testAnonymous() {
     // the highest and lowest number of observed during test runs.
     // See https://www.drupal.org/project/drupal/issues/3402610
     $this->assertGreaterThanOrEqual(58, $performance_data->getQueryCount());
-    $this->assertLessThanOrEqual(67, $performance_data->getQueryCount());
+    $this->assertLessThanOrEqual(68, $performance_data->getQueryCount());
     $this->assertGreaterThanOrEqual(129, $performance_data->getCacheGetCount());
     $this->assertLessThanOrEqual(132, $performance_data->getCacheGetCount());
     $this->assertGreaterThanOrEqual(59, $performance_data->getCacheSetCount());
@@ -131,7 +131,7 @@ public function testLogin(): void {
     // random test failures, assert greater than equal the highest and lowest
     // number of queries observed during test runs.
     // See https://www.drupal.org/project/drupal/issues/3402610
-    $this->assertLessThanOrEqual(42, $performance_data->getQueryCount());
+    $this->assertLessThanOrEqual(39, $performance_data->getQueryCount());
     $this->assertGreaterThanOrEqual(39, $performance_data->getQueryCount());
     $this->assertSame(28, $performance_data->getCacheGetCount());
     $this->assertLessThanOrEqual(2, $performance_data->getCacheSetCount());
@@ -163,14 +163,15 @@ public function testLoginBlock(): void {
     $performance_data = $this->collectPerformanceData(function () use ($account) {
       $this->submitLoginForm($account);
     });
-    $this->assertLessThanOrEqual(51, $performance_data->getQueryCount());
+    $this->assertLessThanOrEqual(50, $performance_data->getQueryCount());
     $this->assertGreaterThanOrEqual(48, $performance_data->getQueryCount());
-    $this->assertSame(30, $performance_data->getCacheGetCount());
-
-    // This test observes a variable number of cache sets, so to avoid random
+    // This test observes a variable number of cache operations, so to avoid random
     // test failures, assert greater than equal the highest and lowest number
     // observed during test runs.
     // See https://www.drupal.org/project/drupal/issues/3402610
+    $this->assertLessThanOrEqual(32, $performance_data->getCacheGetCount());
+    $this->assertGreaterThanOrEqual(30, $performance_data->getCacheGetCount());
+
     $this->assertLessThanOrEqual(4, $performance_data->getCacheSetCount());
     $this->assertGreaterThanOrEqual(1, $performance_data->getCacheSetCount());
     $this->assertSame(1, $performance_data->getCacheDeleteCount());