I don't think Magento has an inbuilt function to specifically exclude products already on sale through a catalog rule.
When setting up your coupon code rule use this to exclude your Product A (and other on sale products)
One other approach is to create a new category (On Sale), which you can easily keep out of the navigation menu if you do not want to display it.
Then place your product A into the category.
When setting up the coupon code rule use this to exclude the on sale category
I recall something similar happening to a site some time ago (year+) - for some reason I cannot find my question regarding the issue.
Basically:
cart totals got multiplied (sometimes 3 times) AFTER shipping was applied to the quote object. So after you leave cart to checkout, or in cart applied shipping.
In my case it was an errand 3rd party extension that had an observer, which added in a shipping address to the Quote object. Since there was already a shipping address selected, it ended up adding a 3rd address (and a 4th and so on, as you go back and forth between checkout and cart)
So, the quote object had:
1 x Billing address
2 x Shipping Address
Since totals are calculated on addresses, magento #1 internals faithfully iterated both the shipping addresses, and tallied up the totals.
I don't recall the exact details, but it was tracked down by wiping all order / order address data in the relevant tables. Then entering the checkout, and checking the order tables tables for entries.
It was then found multiple address were being inserted into the order address table.
Maybe your issue not the exact same issue, but may also be related to multiple addresses being attached to the quote.
Hope that helps in some way.
Best Answer
Here's what happens:
So your fix is to calculate discount price excluding VAT or apply at subtotal including tax.