Alright, perhaps I thought a bit too quickly.
I never took into account the possibility that what I had been casting didn't take into effect a few seconds later.
Client-to-server-to-client lag explains part of it. There's a certain amount of it built in, and he who attacks faster will get hits in before the slower person.
I have macros set up to pop Holy Aura, Serenstum or candy, and then a health pot. I've fiddled with timings and have left sufficient waits so that the selected dessert is *supposed* to be used before HA ends. However...there have been many times when only HA goes off for me, the dessert doesn't, the HP pot does, and I'm already dead from the incipient lag. Go figure.
I've also discovered that it's quite easy to "buffer" several keystrokes in advance of either clicking or keying immunes. The buffered keystrokes are queued up and go off before the immune does. Gets me killed on a regular basis.