My great-grandparent harmed your great-grandparent, and now I am convicted in response?
At the very least this sentence would appear to violate statute of limitations :-) But the bigger problem is that the punishment has no deterrent value--there is no way for me to change my great-grandparent's behavior. And it is straightforwardly unjust to convict me for a crime I didn't commit.
I think this is actually a pretty racist idea--that because you share genes with someone, you are partially responsible for crimes they've committed. It would be like if someone in a small town committed a crime, and the town responded by having the police begin always harassing every member of the criminal's race.