xcodebuild fails with error=nsconsumed-mismatch when using Xcode11 iOS13 SDK

I use the following command to build/archive my project:

xcodebuild -UseNewBuildSystem=NO -workspace WORKSPACE -scheme TARGET clean archive

The compilation fails with the following error:

error: -Werror=nsconsumed-mismatch is currently enabled, but was not in the PCH file

The same build command works when building against Xcode 10.2/10.3 and iOS 12 sdk.