Fix the logic in check_if_required () to accommodate Drush and Drupal core differences.