864c864,868
< if isinstance(child, ptype):
---
> visited = False
> if hasattr(child, '_visited'):
> visited = getattr(child, '_visited')
>
> if isinstance(child, ptype) and not visited: