There is some relevant case law about this sort of situation, if my memory of my criminal law classes is correct.
It's not exactly the same, but, IMHO, similar enough.
The case concerned a man, his wife and the man's friend. The wife agreed to have sex with her husband. The man told his friend his wife agreed to have sex with him (friend). The wife was In bed, in the dark and the friend went in and had sex with her, the wife then realised it was not her husband.
The husband was convicted and the friend cleared. The friend genuinely believed she had given consent so was not guilty of rape, the husband knew the wife's consent was only for him, not the friend, so was convicted.
I think this case (and I wish I could remember the name of the case, but I can't right now) shows that informed consent includes knowing the true identity of the other party, not just the fact that someone has consented to have sex.
This is also similar to the alleged (I am not disbelieving, I am just using the term in a legal context) rapes the Swedish courts want to try Julian Assange for. In those cases the women consented to sex with a condom, he is alleged to have removed the condom without their knowledge, therefore, in the view of the women and the prosecutor, the consent was invalid.