That's a built-in thing; Visa, MasterCard, Amex all have updater services that ensure trusted merchants get the replacement card seamlessly. This leads to annoying edge cases like yours.
BoA issued me a new card after a fraudulent charge, the next year on the same date the same fraudulent charge showed up (annual billing cycle). This happened for more than three years because after they issued a new card they updated the service that billed the fraud with the new number.