In the middle of rewriting expressions like (A*B + A*C + D) to pull
common factor A out, the algorithm finds that there's actually only one
A. This is unexpected, and it fires an assertion.
This can occur when A is a constant, and constant -A also appears in the
terms somewhere else.
There is no harm in this situation, however, because the algorithm then
creates an addition-tree, but with a single element, and that's still
correct.
This bookkeeping issue was fixed later in LLVM, at
95abfa35d6
Unfortunately the associated test doesn't translate cleanly to DXC-era
LLVM. I've added test case reduced from our original case.
Fixed: #6829