Fix TEMPLATE_DEBUG setting.