CRM-12930 Execute Smarty templates before token replacement