support cloning cyclic data structures