private boolean addStack(Stack stack,
	                         LinkedHashMap<Integer,Stack> destinationStack)
	{
		if ((null == stack) || (null == destinationStack)) return false;

		Integer subStackKey = Integer.valueOf(stack.stackID());

		// When the stack ID is zero, the keys in the sub-stack map are
		// set incrementally.

		if ((0 == subStackKey.intValue()) && !destinationStack.isEmpty())
		{
			Set<Integer> subStackKeySet = destinationStack.keySet();

			// Assume that the next key ID is 1 greater than the
			// last one added.

			subStackKey = Integer.valueOf(destinationStack.size());

			// If an entry with the new key exists, assume that a
			// previously added sub-stack has been removed and
			// attempt to find (starting at zero) a "free" ID.

			if (subStackKeySet.contains(subStackKey))
			{
				for (int i = 0;i < destinationStack.size();++i)
				{
					subStackKey = Integer.valueOf(i);

					if (!subStackKeySet.contains(subStackKey)) break;
				}
			}
		}

		// This should only happen if sub-stacks with unique IDs are
		// used and a duplicate exists OR when unique IDs and generated
		// keys (stack ID equals zero (see above)) are mixed.

		if (!destinationStack.isEmpty() &&
		    destinationStack.keySet().contains(subStackKey))
		{
			return false;
		}

		// Clear the position label in the new stack and then add it.

		stack.setPositionLabel(null); // Specifying null makes it empty.

		destinationStack.put(subStackKey,stack);

		return true;
	}