[ticket/12382] Add template test for subloops inside includes

PHPBB3-12382