diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 68e166ce312188cf6f812f7e3e503ccf4ff57fe5..414357fecffaed72ded8fc08e6250755c8b24660 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -473,7 +473,7 @@ public function boot() {
     if (Settings::get('class_loader_auto_detect', TRUE) && method_exists($this->classLoader, 'setApcuPrefix')) {
       // Vary the APCu key by which modules are installed to allow
       // class_exists() checks to determine functionality.
-      $id = 'class_loader:' . crc32(implode(array_keys($this->container->getParameter('container.modules')), ':'));
+      $id = 'class_loader:' . crc32(implode(':', array_keys($this->container->getParameter('container.modules'))));
       $prefix = Settings::getApcuPrefix($id, $this->root);
       $this->classLoader->setApcuPrefix($prefix);
     }