[BUGFIX stable] Fixes issues with unescaped strings `{{{x}}}`

This Fixes #9805 in stable and should work in beta as well.
There is a separate fix for canary that has also been submitted
where the structure has changed for HTMLBars.