Index: /trunk/ippTools/share/stacktool_find_complete_warps.sql
===================================================================
--- /trunk/ippTools/share/stacktool_find_complete_warps.sql	(revision 16687)
+++ /trunk/ippTools/share/stacktool_find_complete_warps.sql	(revision 16688)
@@ -16,5 +16,8 @@
     WHERE
         warpRun.state = 'stop'
-    GROUP BY
-        warp_id
+-- It seems like we should be grouping the results here but in fact we don't
+-- want to do that as each warp_id may contain multiple skycells.  So a warp_id
+-- may end up in more than one stackRun (for different skycells)
+--    GROUP BY
+--        warp_id
 
Index: /trunk/ippTools/src/stacktool.c
===================================================================
--- /trunk/ippTools/src/stacktool.c	(revision 16687)
+++ /trunk/ippTools/src/stacktool.c	(revision 16688)
@@ -246,5 +246,5 @@
         for (long j = 0; j < psArrayLength(col); j++) {
             bool status;
-            psS64 warp_id = psMetadataLookupS64(&status, col->data[0], "warp_id");
+            psS64 warp_id = psMetadataLookupS64(&status, col->data[j], "warp_id");
             if (!status) {
                 if (!psDBRollback(config->dbh)) {
