‘Maxim’:"actor qui contra regulam quid aduxit, non estaudiendus"…
"the party who has brought something contrary to the rule, is not to be heard".
It is a legal maxim that states that a man or woman; who violates a rule or principle of law, should not be allowed to benefit from it.
It is also known as the
“clean hands doctrine” or the
“dirty hands doctrine”…
Depending on your point of view…
Wikipedia
https://en.wikipedia.org/wiki/Clean_hands