Index: includes/ajax.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/ajax.inc,v
retrieving revision 1.2
diff -u -p -r1.2 ajax.inc
--- includes/ajax.inc	18 Aug 2009 11:26:04 -0000	1.2
+++ includes/ajax.inc	20 Aug 2009 16:21:10 -0000
@@ -214,9 +214,10 @@ function ajax_form_callback() {
   if (drupal_function_exists($callback)) {
     $html = $callback($form, $form_state);
 
-    // If the returned value is a string, assume it is HTML and create
-    // a command object to return automatically.
+    // If the returned value is a string, assume it is HTML, add the status
+    // messages, and create a command object to return automatically.
     if (is_string($html)) {
+      $html = theme('status_messages') . $html;
       $commands = array();
       $commands[] = ajax_command_replace(NULL, $html);
     }
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.305
diff -u -p -r1.305 poll.module
--- modules/poll/poll.module	20 Aug 2009 09:47:04 -0000	1.305
+++ modules/poll/poll.module	20 Aug 2009 16:21:10 -0000
@@ -380,7 +380,7 @@ function poll_choice_js($form, $form_sta
 
   // Prevent duplicate wrappers.
   unset($choice_form['#prefix'], $choice_form['#suffix']);
-  return theme('status_messages') . drupal_render($choice_form);
+  return drupal_render($choice_form);
 }
 
 /**
