The Instancer mode of the node is intended for varying material
behavior between instances. Since Geometry Nodes support arbitrary
named instance attributes, this mode should include them in lookup.
To implement this it is sufficient to store references to Geometry
Node data in DupliObject, and check it during dupli attribute lookup.
In order to reduce the memory usage of DupliObject, only 4 array
entries are allocated, even though the current dupli recursion stack
limit is 8. This assumes that not every entry would be associated with
a GeometrySet instance. Hopefully, soon the whole system will be
rewritten to remove the hard limits altogether.
Test file:
All cubes should have different colors, because the shader uses Color provided by the original cube vertex colors, and uv_map generated by the Grid node. The inner Color hides the Color added to the grid by a node, which in turn hides the Color custom property on the object.