I've seen this error a lot when working with two different versions of the same library. Specifically, you can directly include version A, but a different library depends on a version B, with some of that exposed in the public API.
To anyone who gets a cryptic error message - that's a bug, report it.