Merge 'template_error_handling' bugfix.