There's a similar bug with the age of consent laws where I live. General gist of things is that the age of consent is 17, however if both participants are under 17 and the age gap is small (typically less than 1 year), there's an exception clause (I believe this is known as a "Romeo & Juliet" clause).
This leads to the odd scenario where someone born 16y364d ago can get it on with someone born 16y363d ago, then the very next day it becomes illegal, and the day after that it becomes legal again.
So if you're 22, the crime you committed when you were 19 won't count against you, but when you turn 23, it starts counting again?