Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.265.2.12
diff -u -p -r1.265.2.12 form.inc
--- includes/form.inc   23 Sep 2008 10:51:16 -0000      1.265.2.12
+++ includes/form.inc   24 Sep 2008 02:12:53 -0000
@@ -757,7 +757,7 @@ function form_execute_handlers($type, &$
 
   foreach ($handlers as $function) {
     if (function_exists($function))  {
-      if ($type == 'submit' && ($batch =& batch_get())) {
+      if ($type == 'submit' && ($batch =& batch_get()) && !$form['#programmed']) {
         // Some previous _submit handler has set a batch. We store the call
         // in a special 'control' batch set, for execution at the correct
         // time during the batch processing workflow.
