Templating: improved back compatibility for Latte
WIP (Released version 2.2-RC1)