When performing a delayed access check, use the surrounding lexical context for
any local extern declaration, not just a local extern function.