Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.265.2.35
diff -u -p -r1.265.2.35 form.inc
--- includes/form.inc	4 Nov 2010 09:55:29 -0000	1.265.2.35
+++ includes/form.inc	9 Nov 2010 21:49:21 -0000
@@ -769,8 +769,8 @@ function form_execute_handlers($type, &$
 
   foreach ($handlers as $function) {
     if (function_exists($function))  {
-      // Check to see if a previous _submit handler has set a batch, but 
-      // make sure we do not react to a batch that is already being processed 
+      // Check to see if a previous _submit handler has set a batch, but
+      // make sure we do not react to a batch that is already being processed
       // (for instance if a batch operation performs a drupal_execute()).
       if ($type == 'submit' && ($batch =& batch_get()) && !isset($batch['current_set'])) {
         // Some previous _submit handler has set a batch. We store the call
@@ -936,8 +936,8 @@ function form_builder($form_id, $form, &
   if (isset($form['#after_build']) && !isset($form['#after_build_done'])) {
     foreach ($form['#after_build'] as $function) {
       $form = $function($form, $form_state);
-      $form['#after_build_done'] = TRUE;
     }
+    $form['#after_build_done'] = TRUE;
   }
 
   // Now that we've processed everything, we can go back to handle the funky
