The create stacks by N function seems to have a bug in it. This seems very unlikely to me but I can't see any mistake I am making.
I have a 13 column, 10 row pano with five levels of bracketing. The images are named c<col>-<index>.tif where <col> and <index> are both two-digit counters. <col> is the column number and <index> runs from 01 to 50 in bracket-then-row order. So for example, c02-14.tif is the 4th bracket of the third image in column 2.
The first three screenshots show the images for the first two and fourth columns in Adobe Bridge. The next screenshot shows the images loaded into AP and everything looks OK. The next screenshot shows me telling AP to create stacks by N for N=5 and to use the 4th image as the reference. The next screenshot shows the result of the operation. Everything looks OK - notice how the <index> part of the filenames on the tops of the stacks are exactly what you would expect i.e. they all end in 4 or 9.
Things go wrong further down. The last screenshot shows the stacks for column 4. Notice that the pattern of 4s followed by 9s is broken: after c04-14.tif we should see c04-19.tif but in fact AP shows c04-20. The obvious conclusion is that my naming of files is incorrect and that if we look at the original files we will find that the 5th file after c04-14.tif is indeed c04-20.tif, but it isn't, it is c04-19.tif (see third screenshot). For the record, all the stacks after the one headed by c04-20.tif are all wrong too.
The upshot of all this is that AP makes a mess of the rest of the stitch and render because it hasn't got the layers right.
In the group contextual menu, could you please select View->View details and show us how the bad stacks are built ? I would like to know if the problem is the reference image or the stack images themsleves ?
By the way can you please try to build a small group with only 1 row for example (with the images that create the bad stacks) ?