+ // 3.1. Check, if any reference feature is going to be moved, too.
+ // If it is, we can ignore its dependency in our subsequent check (3.2)
+ std::set<FeaturePtr> aNoMoveRefFeatures;
+ std::set_difference(aRefFeatures.begin(), aRefFeatures.end(),
+ aSelectedFeatures.begin(), aSelectedFeatures.end(),
+ std::inserter(aNoMoveRefFeatures, aNoMoveRefFeatures.begin()));
+ if (aNoMoveRefFeatures.empty())
+ continue;
+
+ // 3.2. Find any placed features in all remaining (non-moved) reference features