RTLD_GLOBAL is a bug
This was MR !327 (closed). Resubmitting as the "main" branch is not "master".
Avoid the use of dlopen(...,RTLD_GLOBAL) followed by dlsym(NULL,...) by using RTLD_DEFAULT instead.
I believe this will solve a raft of the issues found by searching for dlopen().