Bug with .binaryTarget in Swift Packages with Xcode?

Another bizarre thing about this bug is that it seems to be quite intermittent. Our CI system has several fastlane "lanes" that each get built on a separate Mac. For reasons unknown, sometimes they will fail with the above-mentioned error, where SPM acts like like SwiftProtobuf doesn't exist:

/REDACTED/TensorManifold/Sources/TensorManifold/base.pb.swift:13:8: 
error: no such module 'SwiftProtobuf'
import SwiftProtobuf

I can assure you in all these cases, SwiftProtobuf.xcframework does in fact exist, and the path "lib/SwiftProtobuf.xcframework" is a valid path (it's a symlink to where the actual XCFramework is kept).

Can anyone think of a reason why this should fail intermittently like that?