e49f915c10
Use a simple generation count instead and restart looking for work if it changed (e.g. due to an dlopen call from an init function). Leave the possible dlclose() race for now.