private static int distributeGrow(int amt, int[] values, int[] max) {
		// Copy the values and sort them from smallest to largest
		int[] order = new int[values.length];
		System.arraycopy(values, 0, order, 0, values.length);
		Arrays.sort(order);

		// Find the next-to-smallest
		int pos = 1;
		while (pos < values.length && order[pos] == order[pos - 1]) {
			pos++;
		}

		// Go through each position and try to expand it
		for (; pos < values.length && amt > 0; pos++) {
			amt = fill(amt, order[pos], values, max);
		}
		if (amt > 0) {
			amt = fill(amt, LayoutSize.MAXIMUM_SIZE, values, max);
		}

		return amt;
	}