-ObjC linker flag causing build errors with Swift packages?

I'm converting an existing iOS framework to a Swift package; it is being consumed by an IOS app.

The Swift package (which contains a mix of Obj-C, Obj-C++, and C++) compiles and I can run unit tests against it. When I try building the app and link against the package, I get a very large number of "duplicate symbol" errors, where the symbols in question are also found in other packages consumed by the app.

What I don't understand is that most of these symbols should be completely hidden. In one example from the new package, I have essentially the case below (simplified here):

// MyFile.h 
//(include guards)

int doSomething();
// MyFile.cpp

#include "MyFile.h"

int localFunction() {
    int result = 0;
    // do some processing, set result to 0 or 1; 
    return result;
}

int doSomething() {
    // do some processing
    // ...
    // check an intermediate result
    if (localFunction() == 0) {
        return 0;
    }
    // do some other stuff
    return 1;
}

and yet localFunction is reported as one of the duplicate symbols, because another Swift Package uses the same source file, where that symbol should also be completely hidden. The client app sets the -ObjC linker flag; I have seen where this causes the same (or at least very similar) behavior and was considered a bug (https://developer.apple.com/forums/thread/106694).

I am using Xcode 13 Beta and Xcode 13.2 beta, and get the same issue with both.

Bug in Xcode? Flaw in my handling/understanding? (Is this related to the ObjC flag, and correctly so?)