Revert "Remove broken optimization for circular data structures in deepeq"
Luite has a better fix.

This reverts commit ee179ff535fd1e328a642763652920ae3cfb36bd.