I have no idea where to begin with this, other than to rewrite the affected methods from scratch in case I’m just burnt and blind.
Has anyone else run into this and subsequently fixed it? If so, how?
Few additional comments (likely to put on the back burner, as they are mainly for non-funcrefs, I suppose):
Replace local index = 991 in the repro with an index that would not fit with within a 32-bit integer, e.g., local index = 2147483647 + 1.
Maps in msgpack are not statically typed and each key has their own type data (Here is how its handled in the msgpack-c example). Someone may run into an issue of the first “key” not being a string (given the unordered nature of Lua tables), or a map with Integer key 1 and String key “1” (there could probably be some deterministic rules here?);