Fix include tag to avoid NameError

This fixes a bug that is a result of my refactoring done in #1341: when the file name fails to validate, instead of rendering the error message to the file, a `NameError` exception is raised because the variable `error` is not properly initialized.