Ensure we use the correct shard when checking for case-sensitivity issues
diff --git a/Scripts/create_pods_and_versions_index.rb b/Scripts/create_pods_and_versions_index.rb
index f35d483..a319543 100755
--- a/Scripts/create_pods_and_versions_index.rb
+++ b/Scripts/create_pods_and_versions_index.rb
@@ -61,9 +61,11 @@
     specs = pod.versions.map do |v|
       begin
         source.specification(name, v)
-      rescue Pod::StandardError
-        # Attempt to recover case-sensitivity issues
-        source.specification(name.downcase, v)
+      rescue Pod::StandardError => e
+        # Attempt to recover case-sensitivity issues. Some old pods were published with all-lowercase file names
+        glob = (source.pod_path(name) + v) + '*.podspec.json'
+        file = Pathname.glob(glob).first
+        Pod::Specification.from_file(file)
       end
     end
     PodMetadata.new(pod.name, pod.shard, specs, pod.versions)