Fixes for https://github.com/socketwench/flag-drupal8/issues/7 and changes to Drupal core.