diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index ded5b13..ed7c4ce 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -1371,7 +1371,7 @@ function file_managed_file_value(&$element, $input = FALSE, $form_state = NULL)
   }
 
   // Process any input and save new uploads.
-  if ($input !== FALSE) {
+  if ($input) {
     $input['fids'] = $fids;
     $return = $input;
 
diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
index e481384..df265e2 100644
--- a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
+++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php
@@ -30,6 +30,31 @@ public static function getInfo() {
   }
 
   /**
+   * Tests that files are not deleted when attached to a form with #access = hidden.
+   */
+  function testFileSaveAccessHidden() {
+    $type_name = 'article';
+    $field_name = strtolower($this->randomName());
+    $this->createFileField($field_name, $type_name);
+    $field = field_info_field($field_name);
+    $instance = field_info_instance('node', $field_name, $type_name);
+
+    $test_file = $this->getTestFile('image');
+    $nid = $this->uploadNodeFile($test_file, $field_name, $type_name);
+    $node = node_load($nid, TRUE);
+
+    // Hide the file field on the form.
+    $edit = array(
+      'field_image' => array('#access' => FALSE),
+    );
+    // Save the node and ensure it does not have the file.
+    $this->drupalPost("node/$nid/edit", $edit, t('Save'));
+    $node = node_load($nid, TRUE);
+    $node_file = file_load($node->{$field_name}[LANGUAGE_NOT_SPECIFIED][0]['fid']);
+    $this->assertFileExists($node_file, t('File still exists.'));
+  }
+
+  /**
    * Tests upload and remove buttons for a single-valued File field.
    */
   function testSingleValuedWidget() {
diff --git a/core/modules/file/tests/file_module_test.module b/core/modules/file/tests/file_module_test.module
index 19096f9..6c0509b 100644
--- a/core/modules/file/tests/file_module_test.module
+++ b/core/modules/file/tests/file_module_test.module
@@ -47,12 +47,21 @@ function file_module_test_form($form, &$form_state, $tree = TRUE, $extended = TR
     $default_fids = explode(',', $default_fids);
     $form['nested']['file']['#default_value'] = $extended ? array('fids' => $default_fids) : $default_fids;
   }
+  if (isset($form_state['clicked_button']) && $form_state['clicked_button']['#value'] == t('Continue submit')) {
+    $form['nested']['file']['#access'] = FALSE;
+  }
 
   $form['textfield'] = array(
     '#type' => 'textfield',
     '#title' => t('Type a value and ensure it stays'),
   );
 
+  $form['continue_submit'] = array(
+    '#type' => 'submit',
+    '#value' => t('Continue submit'),
+    '#submit' => array('file_module_test_form_continue_submit'),
+  );
+
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
@@ -62,6 +71,14 @@ function file_module_test_form($form, &$form_state, $tree = TRUE, $extended = TR
 }
 
 /**
+ * Form submit handler to continue multi-step form.
+ */
+function file_module_test_form_continue_submit($form, &$form_state) {
+  drupal_set_message(t('Continue button clicked.'));
+  $form_state['rebuild'] = TRUE;
+}
+
+/**
  * Form submission handler for file_module_test_form().
  */
 function file_module_test_form_submit($form, &$form_state) {
