fixes https://github.com/socketwench/flag-drupal8/issues/64 W- SOD on in...

This pull request is a candidate fix for https://github.com/socketwench/flag-drupal8/issues/64

Just keeping update with change in core 

https://www.drupal.org/node/2338561