It is narrated from Sayyiduna Abdullah (may Allah be pleased with him) that when someone apostatises, his children inherit from him.
This is munqati' (broken); al-Qasim did not meet his grandfather.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12466