diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index ce63484..f1ff6d7 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1162,7 +1162,13 @@ function file_token_info() {
 function file_managed_file_process($element, &$form_state, $form) {
   // Append the '-upload' to the #id so the field label's 'for' attribute
   // corresponds with the file element.
-  $element['#id'] .= '-upload';
+  list($upload_id, $count) = array_pad(explode('--', $element['#id']), 2, NULL);
+  if ($count) {
+    $element['#id'] = '#' . $upload_id . '-upload--' . $count;
+  }
+  else {
+    $element['#id'] = '#' . $upload_id . '-upload';
+  }
 
   // This is used sometimes so let's implode it just once.
   $parents_prefix = implode('_', $element['#parents']);
