I believe the key here is to understand that when a closure is created, it makes its own copy of the lexical environment; that's what distinguishes a "closure" from an ordinary procedure (sub). So whatever lexical variables are in scope now have an independent existence in the closure.