Personally I find this scenario unlikely, if the dog has been properly trained with the fence. I've had quite a bit of experience with different species of animals (horses, dogs, cattle, goats, sheep, etc.) and electric barriers. An animal that has been properly introduced has no confusion whatsoever about the source of the discomfort, or the fact that the option of getting zapped is entirely up to him/her.
Late to the party, as usual…
Unfortunately, Lisa's scenario is repeated far too often with dogs. We have seen it a number of times. The fact is, that even the most well timed positive punisher has one thing not within the handler's control: what is most salient to the dog at the time. Even if the training is consistent and well timed, if -in that moment- the thing that was most in the dog's mind was the other dog, they could most certainly associate the shock with the other dog.
If OP's dog has had pleasant experiences with big dogs, but only unpleasant with small dogs (I get to play with big dogs, little dogs only pass by/cause me to get shocked) it is certainly plausible (but guessing on our part and it could just as easily be that she just doesn't like small dogs). Also, though perhaps irrelevant, Dr.Jim Ha stated in one of his DVDs* that Toy Poodles have in tests proven to be less able to readily recognize social signals in other dogs, thereby making them sort of doggie cretins (my word, not his). So while the behavior is uncool, several factors could certainly play in, including the invisible fence. And then there of course is your key phrase, "if the dog has been properly trained with the fence". Many are poorly trained with the fence and, IME, many are willing to run through it given a good enough reason. Just one more reason I dislike them.
Gotta say, I agree with everyone else that has said, "Get a physical fence." If you had one, OP, this would never have happened.
*"Behavioral Genetics" IIRC