I too was a victim of the bill swap and yes there was another person doing the windows as a distraction, I just happened to turn as the guy was pulling a 50 out of his shirt pocket to replace my 500, it was sorted out in my favor after a lot of verbiage. This was a few years ago but a friend just recently had a similar attempt made on him but managed to recover the correct amount of change.
I only recently started using my credit card and of course I have been quite careful but what I just realized that I was handing over my credit card to the attendant and he/she would take the card away to the machine. Not any more though, haven't been burned but could have.
What happens also as you spend more and more time in Mx. you become complacent which is not a good thing. After 15 +/- years I don't know how many times I have left a Pemex scratching my head and wondering what just happened here!
On my last fill up the 2 machines they had would not take my credit card which was in good standing and I had used at that station several times. Fortunately I had enough cash on hand to pay as I usually do. Don't know how that would work out in the boonies if a similar event took place and you don't have the backup cash or maybe a second card.