When expanding dependencies, local component resources act as aggregations of their descendants; rather than adding the component resource itself, each child resource is added as a dependency. Remote component resources, on the other hand, are added directly to the set, as they naturally act as aggregations of their children with respect to dependencies: the construction of a remote component always waits on the construction of its children.
46ccb5a22c/sdk/go/pulumi/rpc.go (L65-L91)
However, rehydrated components (i.e. instances of a component resource that have been recreated from a URN, typically via deserialization of a resource reference) won't have any children from the SDK's perspective. And because of that, they aren't currently kept as a dependency.
This change fixes rehydrated components to be marked as remote components, in the same way as "dependency resources" are marked as remote components, so that they are kept as a dependency.