Fix class ordering for HookMetaclass