Al-Bukhari transmits a relevant version through ‘Abd Allah b. Maslamah al-Qa‘nabi ← Malik ← ‘Abd Allah b. Dinar ← Ibn ‘Umar, including the instruction to complete the count to thirty.
Al-Qa‘nabi and al-Shafi‘i are both direct pupils of Malik. Hence the route via al-Qa‘nabi constitutes a complete mutaba‘ah for al-Shafi‘i and removes the claim that only al-Shafi‘i supplied that wording from Malik.
The example shows why matching subject matter is not enough by itself: one must specify the point at which the two chains converge.