Alice would have taken care to not use non-local variables in lambda
bodies, being aware that lambda
did not create lexical closures.
In Emacs Lisp, this simple policy is actually sufficient to avoid most issues with dynamical scoping, because in the absence of concurrency, local let
-bindings of dynamic variables are mostly equivalent to lexical bindings.
In other words, Emacs Lisp developers of the “old days” (which are not so old given the amount of dynamically scoped Emacs Lisp still around) would not have written a lambda
like that. They would not even have wanted to, because Emacs Lisp was not a functional language (and still isn't), thus loops and explicit iteration were often preferred over higher order functions.
With regards to your specific example, Alice of the “old days” would just have written two nested loops.