Fixes #5378: We need a method for the mustache template

Copied from file_template_expand.cf
The indentation is slightly broken here