Ensure a predictable ordering for toDot().