[#297] Call setup_template_variables() in new_metadata()

Fixes #297

@tobes I think you know most about this