[feature/twig] BEGIN loops now work

PHPBB3-11598