84a85,88
> # Search up the tree but mark ourself
> # as visited to avoid a self-reference
> self._visited = True
> obj._visited = True
90a95,97
> self._visited = False
> base._visited = False
>
154,157c161,171
< # for any additional unproxying to be done, pass the
< # current, rather than the original object so that proxy
< # has the right context
< obj = val
---
> visited = False
> if hasattr(val, '_visited'):
> visited = getattr(val, '_visited')
>
> if not visited:
> # for any additional unproxying to be done, pass the
> # current, rather than the original object so that proxy
> # has the right context
> obj = val
> else:
> return None, False