Reference for Makkot 1:4
אֵין הָעֵדִים נַעֲשִׂים זוֹמְמִין עַד שֶׁיָּזוֹמוּ אֶת עַצְמָן. כֵּיצַד, אָמְרוּ מְעִידִין אָנוּ בְאִישׁ פְּלוֹנִי שֶׁהָרַג אֶת הַנֶּפֶשׁ, אָמְרוּ לָהֶן הֵיאַךְ אַתֶּם מְעִידִין, שֶׁהֲרֵי נֶהֱרָג זֶה אוֹ הַהוֹרֵג הָיָה עִמָּנוּ אוֹתוֹ הַיּוֹם בְּמָקוֹם פְּלוֹנִי, אֵין אֵלּוּ זוֹמְמִין. אֲבָל אָמְרוּ לָהֶם הֵיאַךְ אַתֶּם מְעִידִין, שֶׁהֲרֵי אַתֶּם הֱיִיתֶם עִמָּנוּ אוֹתוֹ הַיּוֹם בְּמָקוֹם פְּלוֹנִי, הֲרֵי אֵלּוּ זוֹמְמִין, וְנֶהֱרָגִין עַל פִּיהֶם:
Witnesses do not become zomemin until they themselves are rendered zomemin, [i.e., in respect to what concerns them, and not what concerns the killer or the killed, as explained below. This is derived from (Deuteronomy 19:18): "And, behold, a false witness is the witness" — until the falsehood inheres in the persons of the witnesses themselves.] How so? If they said: We testify about this man that he killed another, and they are refuted — How can you say this when the (alleged) victim or murderer was with us that day in a different place? — they are not rendered zomemin. But if they said: How can you say this when you were with us that day in a different place? they are rendered zomemin, and they are killed by their (the refuters') testimony.