If both the heirs and their units actually vanish then it's a bug or corrupted save that's the likely culprit here. The units should never vanish, as you know, they should simply drop out of succession with the former heirs becoming generals with royal blood.