diff --git a/lib/inventory_refresh/inventory_collection/scanner.rb b/lib/inventory_refresh/inventory_collection/scanner.rb
index <HASH>..<HASH> 100644
--- a/lib/inventory_refresh/inventory_collection/scanner.rb
+++ b/lib/inventory_refresh/inventory_collection/scanner.rb
@@ -107,10 +107,7 @@ module InventoryRefresh
       end
 
       def build_parent_inventory_collection!
-        # Don't try to introspect ICs with custom query or saving code
-        return if arel.present? || custom_save_block.present?
-        # We support :parent_inventory_collections only for targeted mode, where all ICs are present
-        return unless targeted?
+        return unless supports_building_inventory_collection?
 
         if association.present? && parent.present? && associations_hash[association].present?
           # Add immediate parent IC as dependency
@@ -120,6 +117,15 @@ module InventoryRefresh
         end
       end
 
+      def supports_building_inventory_collection?
+        # Don't try to introspect ICs with custom query or saving code
+        return if arel.present? || custom_save_block.present?
+        # We support :parent_inventory_collections only for targeted mode, where all ICs are present
+        return unless targeted?
+
+        true
+      end
+
       def add_parent_inventory_collection_dependency!(ic_name)
         ic = load_inventory_collection_by_name(ic_name)
         (dependency_attributes[:__parent_inventory_collections] ||= Set.new) << ic if ic
Simplify build_parent_inventory_collection! based on code climate