disclaimer: i don't condone al-kawthari's rash comments about imams and his berating them. but the logic and defence of our imam (abu hanifah) and the false accusations is obviously valid. will write more on this, in sha'Allah. wa billahi't tawfiq wa nas'alu Allaha al-aafiyah.
the story is repeated in ibn khallikan's biographical notice on mahmud ghaznawi as follows: volume 5, p.180-181: