A classic example is Arjuna’s marriage to Subhadra. She was indeed his distant or rather step cousin. There are other examples too.
It is not a question of sin or consequences. It is more about the fact that marrying a close kin is not good from the genetic point of view. The more the divergence from the heredity point of view the better it is for the progeny. Of course there used to be a strict code among Brahmins who wouldn’t marry in the same gotra. But this again is not so much due to religious as for scientific reasons.
Affectionately,
Alok Da