diff --git a/core/includes/common.inc b/core/includes/common.inc
index f3d8f2c..97fe3af 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -5493,6 +5493,10 @@
   if (isset($elements['#theme'])) {
     $elements['#children'] = theme($elements['#theme'], $elements);
   }
+  // Add autocomplete
+  if (in_array('autocomplete', $children)) {
+    $elements['#children'] .= drupal_render($elements['autocomplete']);
+  }
   // If #theme was not set and the element has children, render them now.
   // This is the same process as drupal_render_children() but is inlined
   // for speed.
