The only reason why you would see duplicates in the tree would be because your object "ChildofChild1 X" actually has the reference set to itself.
The treeview doesn't automatically set or interpret references, I had built a different structure with self-references and was able to show that without any problems.
Why would you want to have an association literally to the same object, in other words why would "ChildofChild1 X" have a reference to "ChildofChild1 X" (itself)?
From a functional perspective I think you should first look at that and see if that is correct, and solve that problem.
If for some reason you want to have that relationship you could try and influence duplicates with an xpath constraint. But I do not know how the platform interprets this with a self-reference.
[not( id = module.Child_ChildRef/module.Child/id)]