[LockingDependencyAnalyzer] Fix updating a pod that has subspec dependencies

Closes https://github.com/CocoaPods/CocoaPods/issues/2879.