Marrying within the community is not marrying (near) cousins. Once you are beyond 2nd cousins, you might as well be not related (for disease purposes), and the old Hindu scriptures go even further than that.
Specifically, men and women would not be married within the same village, but within the same community in other villages (which may only be within a radius of 50km, but that is a lot of people).
Is this not evidence for the original point?