Which loading form has to be emitted must be decided from a small table lookup or so - "Ldind_I1" for booleans, "Ldind_R8" for double floats, and so on.
I tried to muck around with this myself, and discovered the Unbox_Any opcode, present from version 2.0 of the framework; and this also seems to work (see attached patch). Of course, I don't really know what I'm doing, and this isn't present in version 1.0 and 1.1, but could that work also? It makes the fix a one-liner.
Iver