Fixed a defect in the dynamic programming method that resulted in more than one box of the same size to be added to the stack.  It happened because the cached stacks were not cloned.