Updated DeepComparator to handle infinite recursion (fixes #2)