Fix incorrect initialization of TemplateDoesNotExist exceptions.