diff --git a/core-bundle/src/Resources/contao/library/Contao/Model/Collection.php b/core-bundle/src/Resources/contao/library/Contao/Model/Collection.php
index <HASH>..<HASH> 100644
--- a/core-bundle/src/Resources/contao/library/Contao/Model/Collection.php
+++ b/core-bundle/src/Resources/contao/library/Contao/Model/Collection.php
@@ -139,13 +139,11 @@ class Collection implements \ArrayAccess, \Countable, \IteratorAggregate
 	static public function createFromDbResult(\Database\Result $objResult, $strTable)
 	{
 		$arrModels = array();
+		$strClass = \Model::getClassFromTable($strTable);
 
 		while ($objResult->next())
 		{
-			$strClass = \Model::getClassFromTable($strTable);
-			$strPk    = $strClass::getPk();
-			$intPk    = $objResult->$strPk;
-			$objModel = \Model\Registry::getInstance()->fetch($strTable, $intPk);
+			$objModel = \Model\Registry::getInstance()->fetch($strTable, $objResult->{$strClass::getPk()});
 
 			if ($objModel !== null)
 			{
[Core] Micro-optimize the `Model\Collection::createFromDbResult()` method