Fix spurious artifact conflicts caused by left-over state.
We could get spurious conflicts by building A+B (which have true conflicts), then A (which doesn't have conflicts).
RELNOTES: None
@@ -288,7 +288,8 @@ public final class SkyframeBuildView {
if (someConfiguredTargetEvaluated
|| anyConfiguredTargetDeleted
|| !dirtiedConfiguredTargetKeys.isEmpty()
- || !largestTopLevelKeySetCheckedForConflicts.containsAll(newKeys)) {
+ || !largestTopLevelKeySetCheckedForConflicts.containsAll(newKeys)
+ || !skyframeActionExecutor.badActions().isEmpty()) {
largestTopLevelKeySetCheckedForConflicts = newKeys;
// This operation is somewhat expensive, so we only do it if the graph might have changed in
// some way -- either we analyzed a new target or we invalidated an old one or are building
