diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 68204aa..c951807 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -172,7 +172,7 @@ function file_file_download($uri, $field_type = 'file') {
           // Find the field item with the matching URI.
           foreach ($field_items as $field_item) {
             if ($field_item['uri'] == $uri) {
-              $field = $field_item;
+              $field = field_info_field($field_name);
               break;
             }
           }
diff --git a/core/modules/file/tests/file_module_test.module b/core/modules/file/tests/file_module_test.module
index 2fdadb8..3880138 100644
--- a/core/modules/file/tests/file_module_test.module
+++ b/core/modules/file/tests/file_module_test.module
@@ -69,3 +69,17 @@ function file_module_test_form_submit($form, &$form_state) {
   }
   drupal_set_message(t('The file id is %fid.', array('%fid' => $fid)));
 }
+
+/**
+ * Implements hook_file_download_access().
+ */
+function file_module_test_file_download_access($field, $entity_type, $entity) {
+  list(,, $bundle) = entity_extract_ids($entity_type, $entity);
+  $instance = field_info_instance($entity_type, $field['field_name'], $bundle);
+  // Allow the file to be downloaded only if the given arguments are correct: if
+  // any of them is wrong $instance is NULL. Otherwise we must not interfere
+  // with the access check.
+  if (empty($instance)) {
+    return FALSE;
+  }
+}
