Lock flag module to version 7.x-3.0 and apply a patch (drupal.org/node/2024993) to fix PHP warning