> Let's not do that, though I am concerned about the overhead of doing two function lookups per callback.

I think we can restructure a bit so the invalidate (or unpacking if we need to) happens as part of the callback.
As for the method id, I think we can cache it in the session's lang_private stuff.  As I recall, caching method/field ids is a pretty big win.