TemplateFactory: properly handle Traversable in Latte::onCompile