Unfortunately you may or may not be mistaken, depending on the Gospel and how you choose to interpret said Gospel. Of the Four Gospel only three have institution narratives. Of those three Matthew and Mark have the same basic story for the order of the events of the Lord’s Supper. In Mt 26: 21-25 we are told how Jesus announces He will be betrayed. Mt. 26: 26-29 are the actual institution narrative. In Mark the same pattern exists: Mk 14: 18-21 is the Betrayal, 22-25 the institution narrative. The problem with you argument is that in these Gospel the exit of Judas is not mentioned. He may have been there for the entire thing or may have left after Jesus told him He knew.
Luke on the other hand has the order of events switched. In Lk 22: 19-20 we are given the institution narrative. Verse 21 starts the story of Judas. In this Gospel Judas is most assuredly around for the commissioning.
In the end we dont know. Judas may or may not have been at the insitution, but does it really matter? the worst that can happen is we get biblical proof that preists and Bishops are supossed to be as spotless as God himself, they can still sin!