Apply patch from https://drupal.org/node/2202407#comment-8512581.