A helpful insight from C. S. Lewis:
Beware of the argument “the church gave the Bible (and therefore the Bible can never give us ground for criticizing the church).” It is perfectly possible to accept B on the authority of A and yet regard B as a higher authority than A. It happens when I recommend a book to a pupil. I first sent him to the book, but, having gone to it, he knows (for I’ve told him) that the author knows more about the subject than I.
Source: The Collected Letters of C.S. Lewis, vol. 3, ed. Walter Hopper (HarperCollins, 2007), pp. 1307-8.
This captures well the carefully nuanced position articulated in Chapter 1 of the Westminster Confession of Faith:
4. The authority of the Holy Scripture, for which it ought to be believed, and obeyed, dependeth not upon the testimony of any man, or church; but wholly upon God (who is truth itself) the author thereof: and therefore it is to be received, because it is the Word of God.
5. We may be moved and induced by the testimony of the church to an high and reverent esteem of the Holy Scripture…
10. The supreme judge by which all controversies of religion are to be determined, and all decrees of councils, opinions of ancient writers, doctrines of men, and private spirits, are to be examined, and in whose sentence we are to rest, can be no other but the Holy Spirit speaking in the Scripture.
In sum, the testimony of the church counts for something; it serves as a lesser (fallible) authority pointing us to a greater (infallible) authority. And since the second is a higher authority, it can stand in judgment over the first, correcting it where necessary. There’s nothing incoherent about that position, as Lewis’s helpful analogy illustrates.