Fix the in-loop splicing in _removeHook()