A Shafi‘i position holds that an unaware follower need not repeat the prayer because the follower fulfilled the outward duty and ignorance bears on the ruling.
The Hanafi approach focuses on the validity of the imamate itself, while this Shafi‘i approach gives weight to the follower’s independent position and lack of knowledge.