Added calls to features_flush_caches and drupal_static_reset, which is needed to do something similar to panopoly_core panopoly_core_modules_enabled()