Makkot 2 - Marital Disqualifications
Two people want to disqualify a Kohen by testifying about the marital status of his parents. They come to court and state the following: "We testify about a certain man (who until now was presumed to be a qualified Kohen), that he is a son of a divorced woman. Later they are found to be plotting witnesses: two other witnesses came and ask them, "How can you say that you saw this woman being divorced, when on that day you were with us in a different place?"
It is impossible to apply to them what they wanted to inflict on the defendant, even if they are Kohanim. If we disqualify the children of the witnesses, we will violate the commandment of "do to them (but not to their children) what they wanted to do to him." And if we do not disqualify their children, this is not right either, because they did want to disqualify the defendant's children. Therefore, they instead get the punishment of forty lashes.
Art: Diego Rodriguez de Silva y Velazquez - Three Men at a Table