EntityStructureWrapper for file field is not being inflated properly while iterating
Sadly, I am posting a very bad workaround for future reference. Anybody who can improve this is welcome:

function mymodule_node_insert($node) {
  //copy terms
  $nodew = entity_metadata_wrapper('node', $node);
  //@todo this is not cool, figure it out
  foreach ($nodew-&gt;field_media-&gt;value() as $delta =&gt; $files) {
    $filew = entity_metadata_wrapper('file', $files['fid']);
    $filew-&gt;field_taxonomy_entity_reference = array_unique(array_merge($filew-&gt;field_taxonomy_entity_reference, $nodew-&gt;field_taxonomy_entity_reference));
    $filew-&gt;save();

  }
}