Added hasDirectInstance.