Fix support for ldfld/stfld wrappers in gshared code. Fixes #12086.