debuginfo: Implemented proper handling of lexical scopes and variable shadowing.