Index: trunk/ppStack/src/ppStackMatch.c
===================================================================
--- trunk/ppStack/src/ppStackMatch.c	(revision 19245)
+++ trunk/ppStack/src/ppStackMatch.c	(revision 19251)
@@ -85,8 +85,8 @@
     pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily
 
+    static int numInput = -1;            // Index of input file
+    numInput++;
 #ifdef TESTING
     // Read previously produced kernel
-    static int numInput = -1;            // Index of input file
-    numInput++;
     if (psMetadataLookupBool(NULL, config->arguments, "PPSTACK.DEBUG.STACK")) {
         const char *outName = psMetadataLookupStr(NULL, config->arguments, "OUTPUT"); // Output root
@@ -160,5 +160,5 @@
 
             // These values are specified specifically for stacking
-            const char *stampsName = psMetadataLookupStr(NULL, config->arguments, "STAMPS"); // Stamps filename
+            const char *stampsName = psMetadataLookupStr(NULL, config->arguments, "STAMPS");// Stamps filename
 
             psVector *optWidths = NULL;         // Vector with FWHMs for optimum search
@@ -284,5 +284,7 @@
             psFitsClose(fits);
         }
-    }
+#ifdef TESTING
+    }
+#endif
 
 // Extract the regions and solutions used in the image matching
