for the illegal  invariant gl position  in main function  checkisatgloballevel detects a compilation error  but the compilation is not terminated right away  so addinvariantvarying will be called to add a non global invariant varying  see  the compilation error is raised at the end of paparsestrings 