TemplateFactory: properly handle Traversable in Latte::onCompile

I've spent like hour figuring out how to test this. This is the best I got right now.