[ticket/13132] Twig: Move the loops content to the root context

https://tracker.phpbb.com/browse/PHPBB3-13132

PHPBB3-13132