The manifestation currently looks like this:
Running in verbose mode shows that the build graph is already corrupted at this point:
As one can see, there are three different artifacts for the source file debuggerprotocol.cpp, which leads to the error message later.
This is hard to reproduce (but most likely related to change tracking), so we have to solve it incrementally. As a first measure, I will tighten the sanity checks to catch this condition earlier. If we are lucky, hitting that new assertion will lead us right to the problem without a further indirection.