All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
There is no harm in performing the prayer with an Imam who follows one of the Muslim Imams, especially one who has been witnessed for his knowledge and justice like Imam Ibn Haneefah. In fact, adoption of the legal views of some school concerning Fiqh issues is permissible, or may be recommended, and does not constitute a defect in relation with leading others in prayer.
Thus, such an action should not be considered forbidden. In this vein, Allah Says (what means): {So ask the people of the message if you do not know.} [Quran 16:43]
As mentioned above, it is a Divine Command to seek the rulings of Sharee’ah from the Muslim scholars and to follow their verdicts.
In addition, most companions of the Prophet were used to seeking the Sharee’ah rulings, some scholars from among them, have even followed their verdicts without seeking evidence except in some cases. This, for sure, supports the permissibility of imitating some Imams as explained at the beginning of this Fatwa.
Moreover, the Prophet used to send a knowledgeable person or a high-qualified reciter to some tribes to teach them, and they followed his verdicts without seeking evidence.
However, attaining the rank of Ijtihad (independent reasoning based on Quran and Sunnah) and avoiding imitation of some Imam is not a condition for the validity of the prayer when one is performing a congregational prayer.
As for what you mentioned about the defects of those who imitate some Imams, such as bigotry to their school and Imam, it goes without saying that they should avoid such an action and follow the authentic Sunnah. But, we think that those people –in such a bigotry –are motivated by too much trust in their Imams and their ignorance of the Sunnah only; and not due to stubbornness or desire to be against the authentic Sunnah of the Prophet .
Therefore, there is no blame on one who performs congregational prayer with them even if they have some simple innovations that do not extend to a form of Kufr. The Prophet said: “If they (Imams) lead the prayer correctly, then both them and you will receive the rewards, but if they make a mistake (in the prayer) then you will receive the reward for the prayer and the sin falls upon them.” [Al-Bukhari]
The Prophet's Companions used to perform the prayer in congregation while being led by those who are dissolute. For example, as mentioned in al-Isti'aab by Ibn 'Abdul-Bar and in at-Tahawiyah by Ibn Abul-‘Iz, that 'Abdullah Ibn 'Umar used to perform the prayer while being led by al-Hajjaj; and so was 'Abdullah Ibn Mas'ood with al-Waleed Ibn 'Uqbah, who was a drunkard.
Ubaydul-Allah Ibn ‘Adiy Ibn Khiyaar, narrated: “I went to 'Uthman Ibn 'Affaan while he was besieged, and said to him: "You are the chief of all Muslims in general and you see what has befallen you. (Now) We are led in prayer by a leader of trials (tribulations) and we are afraid of being sinful in following him.” 'Uthman answered: “Performing the prayer is the best of people's actions. So, when people do good deeds, you have to do the same; when they do bad deeds, then avoid those bad deeds.”
Thus, the above-mentioned Hadeeth and other pieces of evidence indicate that justice and integrity are not among the preconditions to be an Imam.
However, it is better if the Imam is the most righteous one from among such a group.
Allah knows best.