I don’t really know what sort of docs would help with such a thing, but I can suggest some places to start:
1.) I would start with the bsnes mainline repo rather than bsnes-mercury. They shouldn’t be significantly different but for this sort of investigation, you’ll want to isolate as many variables as possible.
2.) build your own copy of the core and test to make sure the problem exists there, too (i.e., to rule out an issue with our buildbot/toolchain/whatever).
3.) assuming all is as expected, from the same repo, build the standalone bsnes (using target=ethos or whatever) and verify whether the issue happens there. If the issue doesn’t happen with the standalone interface, then something is going on with how libretro hooks into the SGB loading.
4.) if the issue does happen with the standalone interface, go to the official unofficial higan repo on gitlab and checkout the v094 release snapshot and build it. Make sure the issue doesn’t happen there, which would indicate that it’s a problem on our end. If it does happen there, then it’s an upstream problem and we’ll need to try and find out when it was fixed (by building each successive version) and what fixed it and then backport the changes.