Abdullah bin Ma'qil (may Allah have mercy on him) said: I heard Sayyiduna Ali (may Allah be pleased with him) say: Wala' is a branch of lineage; whoever secures the inheritance also secures the wala'.
This is how I found it in this narration, and it is an error. It seems that Yazid conflated al-Thawri's narration with Sharik's, and Sharik erred in it, or else Yazid or someone below him erred.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21503