Caching native templates and cloning nodes to boost performance of
foreach with template