fabpot/Twig — comment on commit 64e3ce6a11a1eb860d14b8e7039adc6411c1f721
File: lib/Twig/Extension/Core.php line 492
By hason:

$value = iterator_to_array($value, false); // solved bad behaviour for items with same key