Set<Object> seen = Sets.newIdentityHashSet();
Iterator<? extends Node> iterator = ascending
? map.evictionDeque.iterator()
: map.evictionDeque.descendingIterator();
while (iterator.hasNext()) {
Node node = iterator.next();
buffer.append(nodeToString(node)).append("\n");
boolean added = seen.add(node);
if (!added) {
buffer.append("Failure: Loop detected\n");
break;