while (!toTraverse.isEmpty()) {
Pair<FeatureNode, Pair<Integer, String>> next = toTraverse.poll();
String debug = next.two.two + (next.two.one > 0 ? " -> " : "") + next.one.name;
if (next.one == this && next.two.one != 0) {
throw new GadgetException(GadgetException.Code.INVALID_CONFIG,
"Feature dep loop detected: " + debug);
}
// Breadth-first list of dependencies.
this.transitiveDeps.add(next.one);
this.nodeDepth = Math.max(this.nodeDepth, next.two.one);