added a part of code to support libraries that is implicitly opened from the function in the library opened with dlopen().