Resolve "too late hook library effective unload"

Part of #1282 (closed)

Edited by Francis Dupont

Merge request reports