and hence a design decision.
I don't understand how you arrive at that conclusion. What design purpose would it serve to keep unaccessible variables referenced? I believe it was plain oversight.
By "design decision" I mean that the problem must have been known at the time the frame copying was put into the code. If that's not the case, well, too bad. :-)
I.e. not introduce statically scoped variables in nested functions at all.
Or don't copy the frame at all, and instead make it a run-time error to access scope variables once the frame is gone. Don't know if that's easy to detect, though.
One reason your pet peeve here hasn't been fixed is that it's more complex than what one might believe.
Don't know if it's my pet peeve; this discussion is the first time I talk about the frame copying issue as far as I can remember. And if it's that complex, are you sure you want me to fix it? :-)