Index: trunk/ppStack/src/ppStackReadout.c
===================================================================
--- trunk/ppStack/src/ppStackReadout.c	(revision 23576)
+++ trunk/ppStack/src/ppStackReadout.c	(revision 23577)
@@ -150,5 +150,5 @@
 
     if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, kernelSize, iter,
-                        combineRej, combineSys, combineDiscard, true, useVariance, safe)) {
+                        combineRej, combineSys, combineDiscard, true, useVariance, safe, false)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection.");
         psFree(stack);
@@ -196,5 +196,10 @@
 
     bool mdok;                          // Status of MD lookup
+    int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations
+    float combineRej = psMetadataLookupF32(NULL, recipe, "COMBINE.REJ"); // Combination threshold
+    float combineSys = psMetadataLookupF32(NULL, recipe, "COMBINE.SYS"); // Combination systematic error
+    float combineDiscard = psMetadataLookupF32(NULL, recipe, "COMBINE.DISCARD"); // Olympic discard fraction
     bool useVariance = psMetadataLookupBool(&mdok, recipe, "VARIANCE"); // Use variance for rejection?
+    bool safe = psMetadataLookupBool(&mdok, recipe, "SAFE"); // Be safe when combining small numbers of pixels
 
     psString maskValStr = psMetadataLookupStr(NULL, recipe, "MASK.VAL"); // Name of bits to mask going in
@@ -206,5 +211,14 @@
     psArray *stack = psArrayAlloc(num); // Array for stacking
 
-    bool entire = (rejected ? false : true); // Combine entire image?
+    bool entire = true;                 // Combine entire image?
+    if (rejected) {
+        // We have rejection from a previous combination: combine without flagging pixels to inspect
+        entire = false;
+        safe = false;
+        iter = 0;
+        combineRej = NAN;
+        combineSys = NAN;
+    }
+
     for (int i = 0; i < num; i++) {
         pmReadout *ro = readouts->data[i];
@@ -240,6 +254,7 @@
     }
 
-    if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0, 0, NAN, NAN, NAN,
-                        entire, useVariance, false)) {
+    if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0,
+                        iter, combineRej, combineSys, combineDiscard,
+                        entire, useVariance, safe, !rejected)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
         psFree(stack);
