TC: pre-save syntax check working again (added lexical/global flag)

The pre-save syntax check has not been able to catch many of the errors
since the addition of the custom Context object. This has now been fixed
with additional logic/code path