Fix a bug where the compiler would not generate the correct exception term when reporting an error in the compilation of a file-level directive