bpo-28936: Detect lexically first syntax error first (#4097)

Lexically first global and nonlocal syntax errors at given scope should be detected first.
3 files changed