Wow that really is quite a drag. It happened to me once as well.
There was this one time when I ran into a shiny Steelix in Pokemon Pearl with Riley. I was aiming for Riley's pokemon but when I used a move on it, suprisingly it did not faint. Riley's pokemon used an attack on the Steelix and it apparently fainted right after. If there was only an option to choose where Riley or the others who follow you around, to make a move on which pokemon that would be cool. Although I don't think it would happen any time soon on if they do happen to do that.
What a bummer, it's almost like you never had a chance.