Formats in closures called outside closures → crash
If a format closing over lexical variables is defined inside a clo-
sure, it must only be called directly inside that closure, not from
any other eval, sub, or format.
Calling it from anywhere else started causing a crash in 5.10.0,
because the format would try to close over variables in the currently-
running sub, using padoffsets intended for a completely unrelated pad.
This commit stops it from crashing by checking whether the currently-
running sub is a clone of the format’s outer sub (a closure proto-
type). If it is not, the outer closure prototype is used, resulting
in ‘Variable is not available’ warnings.
This makes things work as well as they did in 5.8. Ideally, we should
search the call stack for the topmost clone of the format’s outer sub;
but I’m saving that for another commit.