I was playing around with one of the CnC sample codes and found that if I have duplicate identifiers (tag components?) within an item collection, all but one of the items put into the collection are inaccessible. My code was taking a single integer pair (N, M), generating N steps, which in turn generate M steps each, and compute a simple value. For the results item collection, I was using the values of the second step (1..M) as tag components. The execution yielded N results, not N*M as expected.
I assume that there is a hash function used for item collections. If so, how are duplicates handled? Is there a good method for creating unique tag components for elements that are put into an item collection? One that might not require some "state" information with all the items or prescribing tags for step collections. (An obvious way in my example is to know the maximum value of N or M and use N*(maxM)+M or something similar.)