Fix for customised insert module see https://www.drupal.org/node/2295507