private int calculateNextOrderIndex() {
        int followingOrderIndex = 0;
        for (List<QualifiedValue<?>> vals : fields.values()) {
            for (QualifiedValue<?> val : vals) {
                if (val.getOrderIndex() >= followingOrderIndex) {
                    followingOrderIndex = val.getOrderIndex() + 1;
                }
            }
        }
        return followingOrderIndex;
    }