Fix unstable fontification inside templates.