Reference: Al-Fulaani in Eeqaaz al-Himam (p. 50), tracing it to Imaam Muhammad and then saying, This does not apply to the mujtahid, for he is not bound to their views anyway, but it applies to the muqallid. Imaam Abu Haneefah (rahima-hullaah) said:
When I say something contradicting the Book of Allaah the Exalted or what is narrated from the Messenger ﷺ, then ignore my saying.