diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc
old mode 100644
new mode 100755
index dcb2a8c..cf13984
--- a/core/modules/file/file.field.inc
+++ b/core/modules/file/file.field.inc
@@ -180,18 +180,23 @@ function _file_generic_settings_file_directory_validate($element, &$form_state)
 }
 
 /**
- * Implements hook_field_load().
+ * Implements hook_field_prepare_view().
  */
-function file_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
-
+function file_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
+  // Remove files specified to not be displayed.
   $fids = array();
   foreach ($entities as $id => $entity) {
-    // Load the files from the files table.
     foreach ($items[$id] as $delta => $item) {
-      if (!empty($item['fid'])) {
+      if (!file_field_displayed($item, $field)) {
+        unset($items[$id][$delta]);
+      }
+      elseif (!empty($item['fid'])) {
+        // Load the files from the files table.
         $fids[] = $item['fid'];
       }
     }
+    // Ensure consecutive deltas.
+    $items[$id] = array_values($items[$id]);
   }
   $files = file_load_multiple($fids);
 
@@ -209,22 +214,6 @@ function file_field_load($entity_type, $entities, $field, $instances, $langcode,
 }
 
 /**
- * Implements hook_field_prepare_view().
- */
-function file_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
-  // Remove files specified to not be displayed.
-  foreach ($entities as $id => $entity) {
-    foreach ($items[$id] as $delta => $item) {
-      if (!file_field_displayed($item, $field)) {
-        unset($items[$id][$delta]);
-      }
-    }
-    // Ensure consecutive deltas.
-    $items[$id] = array_values($items[$id]);
-  }
-}
-
-/**
  * Implements hook_field_insert().
  */
 function file_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 6541e8d..a2f74f2 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -174,7 +174,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) {
+            if (file_load($field_item['fid'])->uri == $uri) {
               $field = field_info_field($field_name);
               break;
             }
diff --git a/core/modules/file/tests/file.test b/core/modules/file/tests/file.test
index fd25930..2f2cf7c 100644
--- a/core/modules/file/tests/file.test
+++ b/core/modules/file/tests/file.test
@@ -354,7 +354,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
       //   does not yet support file uploads.
       $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
       $node = node_load($nid, NULL, TRUE);
-      $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+      $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
       $this->assertFileExists($node_file, t('New file saved to disk on node creation.'));
 
       // Ensure the file can be downloaded.
@@ -530,7 +530,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
     $this->drupalPost("admin/structure/types/manage/$type_name/fields/$field_name", $edit, t('Save settings'));
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('New file saved to disk on node creation.'));
 
     // Ensure the private file is available to the user who uploaded it.
@@ -596,7 +596,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
     $this->drupalLogin($user);
 
     $comment = comment_load($cid);
-    $comment_file = (object) $comment->{'field_' . $name}[LANGUAGE_NOT_SPECIFIED][0];
+    $comment_file = file_load($comment->{'field_' . $name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($comment_file, t('New file saved to disk on node creation.'));
     // Test authenticated file download.
     $url = file_create_url($comment_file->uri);
@@ -664,7 +664,7 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
 
     // Check that the file exists on disk and in the database.
     $node = node_load($nid, NULL, TRUE);
-    $node_file_r1 = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file_r1 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $node_vid_r1 = $node->vid;
     $this->assertFileExists($node_file_r1, t('New file saved to disk on node creation.'));
     $this->assertFileEntryExists($node_file_r1, t('File entry exists in database on node creation.'));
@@ -673,7 +673,7 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
     // Upload another file to the same node in a new revision.
     $this->replaceNodeFile($test_file, $field_name, $nid);
     $node = node_load($nid, NULL, TRUE);
-    $node_file_r2 = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file_r2 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $node_vid_r2 = $node->vid;
     $this->assertFileExists($node_file_r2, t('Replacement file exists on disk after creating new revision.'));
     $this->assertFileEntryExists($node_file_r2, t('Replacement file entry exists in database after creating new revision.'));
@@ -681,7 +681,7 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
 
     // Check that the original file is still in place on the first revision.
     $node = node_load($nid, $node_vid_r1, TRUE);
-    $this->assertEqual($node_file_r1, (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0], t('Original file still in place after replacing file in new revision.'));
+    $this->assertEqual($node_file_r1, file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']), t('Original file still in place after replacing file in new revision.'));
     $this->assertFileExists($node_file_r1, t('Original file still in place after replacing file in new revision.'));
     $this->assertFileEntryExists($node_file_r1, t('Original file entry still in place after replacing file in new revision'));
     $this->assertFileIsPermanent($node_file_r1, t('Original file is still permanent.'));
@@ -690,7 +690,7 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
     // Check that the file is still the same as the previous revision.
     $this->drupalPost('node/' . $nid . '/edit', array('revision' => '1'), t('Save'));
     $node = node_load($nid, NULL, TRUE);
-    $node_file_r3 = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file_r3 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $node_vid_r3 = $node->vid;
     $this->assertEqual($node_file_r2, $node_file_r3, t('Previous revision file still in place after creating a new revision without a new file.'));
     $this->assertFileIsPermanent($node_file_r3, t('New revision file is permanent.'));
@@ -698,7 +698,7 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
     // Revert to the first revision and check that the original file is active.
     $this->drupalPost('node/' . $nid . '/revisions/' . $node_vid_r1 . '/revert', array(), t('Revert'));
     $node = node_load($nid, NULL, TRUE);
-    $node_file_r4 = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file_r4 = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $node_vid_r4 = $node->vid;
     $this->assertEqual($node_file_r1, $node_file_r4, t('Original revision file still in place after reverting to the original revision.'));
     $this->assertFileIsPermanent($node_file_r4, t('Original revision file still permanent after reverting to the original revision.'));
@@ -712,7 +712,8 @@ class FileFieldRevisionTestCase extends FileFieldTestCase {
 
     // Attach the second file to a user.
     $user = $this->drupalCreateUser();
-    $user->{$field_name}[LANGUAGE_NOT_SPECIFIED][0] = (array) $node_file_r3;
+    $user->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid'] = $node_file_r3->fid;
+    $user->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['display'] = 1;
     $user->save();
     $this->drupalGet('user/' . $user->uid . '/edit');
 
@@ -809,7 +810,7 @@ class FileFieldDisplayTestCase extends FileFieldTestCase {
 
     // Check that the default formatter is displaying with the file name.
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $default_output = theme('file_link', array('file' => $node_file));
     $this->assertRaw($default_output, t('Default formatter displaying correctly on full node view.'));
 
@@ -861,7 +862,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
 
     $node = node_load($nid, NULL, TRUE);
 
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('File exists after uploading to the required field.'));
     $this->assertFileEntryExists($node_file, t('File entry exists after uploading to the required field.'));
 
@@ -877,7 +878,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
     // Create a new node with the uploaded file into the multivalue field.
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('File exists after uploading to the required multiple value field.'));
     $this->assertFileEntryExists($node_file, t('File entry exists after uploading to the required multipel value field.'));
 
@@ -913,7 +914,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
       // Create a new node with the small file, which should pass.
       $nid = $this->uploadNodeFile($small_file, $field_name, $type_name);
       $node = node_load($nid, NULL, TRUE);
-      $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+      $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
       $this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) under the max limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_filesize)));
       $this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) under the max limit (%maxsize).', array('%filesize' => format_size($small_file->filesize), '%maxsize' => $max_filesize)));
 
@@ -929,7 +930,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
     // Upload the big file successfully.
     $nid = $this->uploadNodeFile($large_file, $field_name, $type_name);
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('File exists after uploading a file (%filesize) with no max limit.', array('%filesize' => format_size($large_file->filesize))));
     $this->assertFileEntryExists($node_file, t('File entry exists after uploading a file (%filesize) with no max limit.', array('%filesize' => format_size($large_file->filesize))));
 
@@ -956,7 +957,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
     // Check that the file can be uploaded with no extension checking.
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('File exists after uploading a file with no extension checking.'));
     $this->assertFileEntryExists($node_file, t('File entry exists after uploading a file with no extension checking.'));
 
@@ -974,7 +975,7 @@ class FileFieldValidateTestCase extends FileFieldTestCase {
     // Check that the file can be uploaded with extension checking.
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertFileExists($node_file, t('File exists after uploading a file with extension checking.'));
     $this->assertFileEntryExists($node_file, t('File entry exists after uploading a file with extension checking.'));
 
@@ -1009,7 +1010,7 @@ class FileFieldPathTestCase extends FileFieldTestCase {
 
     // Check that the file was uploaded to the file root.
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertPathMatch('public://' . $test_file->filename, $node_file->uri, t('The file %file was uploaded to the correct path.', array('%file' => $node_file->uri)));
 
     // Change the path to contain multiple subdirectories.
@@ -1020,7 +1021,7 @@ class FileFieldPathTestCase extends FileFieldTestCase {
 
     // Check that the file was uploaded into the subdirectory.
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     $this->assertPathMatch('public://foo/bar/baz/' . $test_file->filename, $node_file->uri, t('The file %file was uploaded to the correct path.', array('%file' => $node_file->uri)));
 
     // Check the path when used with tokens.
@@ -1032,7 +1033,7 @@ class FileFieldPathTestCase extends FileFieldTestCase {
 
     // Check that the file was uploaded into the subdirectory.
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     // Do token replacement using the same user which uploaded the file, not
     // the user running the test case.
     $data = array('user' => $this->admin_user);
@@ -1171,7 +1172,7 @@ class FilePrivateTestCase extends FileFieldTestCase {
     $test_file = $this->getTestFile('text');
     $nid = $this->uploadNodeFile($test_file, $field_name, $type_name, TRUE, array('private' => TRUE));
     $node = node_load($nid, NULL, TRUE);
-    $node_file = (object) $node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0];
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
     // Ensure the file can be downloaded.
     $this->drupalGet(file_create_url($node_file->uri));
     $this->assertResponse(200, t('Confirmed that the generated URL is correct by downloading the shipped file.'));
diff --git a/core/modules/image/image.field.inc b/core/modules/image/image.field.inc
index 2a32c15..460bd90 100644
--- a/core/modules/image/image.field.inc
+++ b/core/modules/image/image.field.inc
@@ -180,16 +180,11 @@ function _image_field_resolution_validate($element, &$form_state) {
 }
 
 /**
- * Implements hook_field_load().
- */
-function image_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
-  file_field_load($entity_type, $entities, $field, $instances, $langcode, $items, $age);
-}
-
-/**
  * Implements hook_field_prepare_view().
  */
 function image_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {
+  // Load the images.
+  file_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, $items);
   // If there are no files specified at all, use the default.
   foreach ($entities as $id => $entity) {
     if (empty($items[$id])) {
