Fixed newly introduced bug: TemplateException serialization has failed.