I once saw a first cousin once removed inherit a duchy from a guy of a different dynasty (the indirect result of some weirdness caused by how I conquered Wessex in my Ireland game, long story). I don't think there should be a hard block, but maybe a short-term increase in revolt risk or something for descent-based forms of inheritance, directly proportional to distance of relation or if the guy who inherits isn't a local. E.g. the peasants and minor nobles aren't sure what to make of this new guy they've barely heard of.