This is the product-badges.liquid file — and I can see the exact issue. The discount badge condition checks product.compare_at_price > product.price but calculates savings from variant.compare_at_price — so if any variant has a compare-at price, it can trigger incorrectly.
Here's the complete corrected file with the fix applied:

