See dlopen_common_global.md for a detailed description of the bug.
The proposed fix is an ugly hack, due in part to casting away const (and the `#pragma` that requires). I would be delighted to throw it away and implement //your// better idea. Removing const from SymLook::defobj_out is fairly invasive and feels wrong.