In flag_features_export(), Flag kindly tries to add related modules as dependencies when a given flag type is exported.
That's all well and good for 2.x, when every module defining a custom entity had to manually implement hook_flag_type_info() in order to register it.
However, now that Flag supports entities on a generic level, this hook is only really ever used if you want to be able to flag custom schemas that aren't entities.
The problem is that if we export a flag on a custom entity, it will incorrectly assume that the entity is defined in hook_flag_type_info() and returned by flag_features_providing_module(), which it's not. It will throw a notice and won't add the dependency. (I ran into this issue exporting a Profile2 flag)
Initially I thought we might be able to assume that the entity name corresponds to the module name and add that directly to the dependencies but despite being the case 90% of the time it's a silly and risky assumption.
Therefore I think we might have to introspect the entity type and find out which module defines it in order to properly add the dependency.