Root causes
- The variable is declared inside a local block, but a statement in global scope tries to read it.
- The identifier is misspelled or its capitalization differs from the declaration.
- The declaration appears after the first use or belongs to another function or local scope.