Fixed #9940 ("bad bug in intrusive list with safe_link (or auto_unlink) hooks")