Properly handle domain unloading when sgen-bridge is in use.