diff --git a/typo3/sysext/core/Classes/Package/PackageManager.php b/typo3/sysext/core/Classes/Package/PackageManager.php
index 15d3d4dd47f8d4b66b541d2f6c41a09c0a682f52..421aae888df77f1dfaa165e1c51504d5316bcd12 100644
--- a/typo3/sysext/core/Classes/Package/PackageManager.php
+++ b/typo3/sysext/core/Classes/Package/PackageManager.php
@@ -688,13 +688,10 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
         $sortedPackageKeys = $this->dependencyResolver->sortPackageStatesConfigurationByDependency($packagesWithDependencies);
 
         // Reorder the packages according to the loading order
-        $newPackages = array();
         $this->packageStatesConfiguration['packages'] = [];
         foreach ($sortedPackageKeys as $packageKey) {
-            $newPackages[$packageKey] = $this->packages[$packageKey];
             $this->registerActivePackage($this->packages[$packageKey]);
         }
-        $this->packages = $newPackages;
         return $packagesWithDependencies;
     }