TemplateOptimizer: ensure that we don't inline false-positives, or other expressions
TemplateHelper::replaceTokens() added tests to ensure that we don't lose any text while performing replacements