I think we should also assert that the resource is a top level resource (`isTopLevel`).