make hier_repr work with objects with circular references