debuginfo: Better management of lexical scopes, properly supporting name shadowing and macros.