diff --git a/lib/librarian/manifest_set.rb b/lib/librarian/manifest_set.rb
index <HASH>..<HASH> 100644
--- a/lib/librarian/manifest_set.rb
+++ b/lib/librarian/manifest_set.rb
@@ -78,8 +78,10 @@ module Librarian
       until names.empty?
         name = names.shift
         manifest = index.delete(name)
-        manifest.dependencies.each do |dependency|
-          names << dependency.name
+        if manifest
+          manifest.dependencies.each do |dependency|
+            names << dependency.name
+          end
         end
       end
       self
Fix an edge case where it was sending #dependencies to nil.