Build Error "Definition of 'aaa' must be imported from module 'bbb' before it is required"

I have a big project, ObjC/Swift, but mostly ObjC, where I'm facing this error "Definition of 'aaa' must be imported from module 'bbb' before it is required"

I couldn't reproduce the same issue in a sample project, and reached a point where I cannot take the project any further until I get to the trigger of this issue. So I'm looking for more explanation what triggers this issue and what does it prevent/why it exists

--

More Details

I face this build error on incremental builds only, my project setup:

TestFrameworkDynamic (Dynamic framework) --(Linked Binaries)-> TestFrameworkStatic (Static framework) --(LinkedBinaries + Libtool flag)-> TestFramewrokInternal (Static framework)

TestFrameworkDynamic has a product name of TestFramework and there's a public ObjC class called TestFramework

The error is triggered when I do any change in TestFrameworkInternal, I get an error in TestFramework.m while building `TestFrameworkInternal

"Definition of 'TestFramework' must be imported from module 'TestFramework' before it is required"

Worth noting that when I change the import from #import "TestFramework.h" to #import <TestFramework/TestFramework.h> the build fails because of A cycle dependency as now it sees that TestFrameworkInternal depends on TestFrameworkDynamic