TT #233 · Parashas Shoftim · Sixth Aliyah · Passuk 19:15
A single witness shall not rise up against a man for any iniquity or for any sin, in any sin that he may commit; by the mouth of two witnesses or by the mouth of three witnesses a matter shall be established.
Torah Temimah points to Sifrei Devarim 188.
TT lemma: שְׁנֵי עֵדִים אוֹ שְׁלֹשָׁה.
English: ‘Two witnesses or three’ – just as with two, if one is found to be a relative or disqualified their testimony is void, so too with three.
Derash applying disqualification rules to larger groups (Sifrei) — three are treated like two for purposes of invalidation.
If one member of a group of witnesses is disqualified, the testimony of the whole group can fall, whether the group is two or three.