Makkos, Chapter 1, Mishnah 4. This mishnah comes to define precisely what "eidim zomemin" (conspiring witnesses) are.
"Ein edim na'asim zomemin ad sheyazimu es atzman":
Witnesses become zomemin only when it is proven that they themselves are liars - and not when it is proven that the testimony they delivered is false testimony. The hazamah (refutation) is not aimed at the content of the testimony, but at the persons of the witnesses themselves.
"Keitzad?" - How so?
The mishnah presents two cases, and sets the difference between them one against the other:
Contradicting the facts of the crime: The witnesses said "Me'idin anu be'ish ploni shehareg es hanefesh" - we testify about so-and-so that he killed a person - and another set of witnesses came and said to them: "Heiach atem me'idin? Shehareh neherag zeh, o haholeg, hayah imanu oso hayom bemakom ploni" - how can you testify? The murdered man, or the murderer, was with us that day in another place, and not in the place where you say the murder took place. Regarding this the mishnah rules: "Ein eilu zomemin" - these are not zomemin, since the second set says nothing about the witnesses themselves, but rather disputes the facts of the crime.
Refuting the witnesses themselves: The second set comes and says to them: "Heiach atem me'idin? Shehareh atem heyisem imanu oso hayom bemakom ploni" - you, the witnesses, were with us that day in another place, and not in the place where you say the murder took place. Regarding this the mishnah rules: "Harei eilu zomemin venehragin al pihem" - these are zomemin and are put to death on their word - on the testimony of the second set the first set is put to death, because the refutation touched the witnesses themselves: it was proven that they could not possibly have been at the scene of the act.
In summary: This mishnah defines what eidim zomemin are - "ad sheyazimu es atzman" - until they themselves are refuted. As long as the second set merely contradicts the facts of the crime, there is no hazamah here; only when it testifies about the witnesses themselves that they were somewhere else, thereby proving that they could not have been at the scene of the act, do the witnesses become zomemin and are put to death on the basis of that testimony.