add global.__template_name__ back

Addresses Issue 327