Drush site install break when a custom commerce feature is enabled, why? The D7 site i'm working has a feature that includes two custom product types, amongst other things.  A custom feature gets auto-detected and added as a dependency because it contains a rule on one of the product types.  Another feature added to the site install profile contains the permissions to those types.

After i exported the features and tried to install the site again, it breaks because:  


the product types are do not get created, i expect this log entry to show but does not:
WD features: Rebuilding feature_name / commerce_product_type
Which, i'm guessing, is when the types get created from the feature.  That log entry shows on a successful build (see below).
consequently, the permissions feature causes a fatal error when trying to insert the types permissions into the db, since they don't exist and not defined by a module (from commerce_entity_access_permissions).


The solution for the fix is to manually remove the auto-detected feature with the rules.

I assumed that there's something wrong with that feature but can't think of what.  Has anyone experienced something like that?
It seems to be a problem with Features and how Drush site-install processes.  Basically, features_include() is called after each feature is enabled during the site install.  Somehow (but most likely due to the ordering of the dependencies), the commerce_features module gets enabled after my custom feature.  As such, features_include(), which has already ran and cached its data, skips calling commerce_features_features_api(), which is crucial for my custom product types, included in yet another custom feature, to be created.

I opened an issue at http://drupal.org/node/1334438, see for more details and follow-ups.