Distinguishing between local scope and execution context