Sometimes the "right" truth gets preached from the wrong text. Instead of exposition listeners are given sermons on truths that are part of the framework of Christian doctrine. They then go away without knowing the intended meaning and application of the text that has been read but not expounded. They can still benefit from that but it isn't the best.
It is a different matter when not only is there a failure in expository excellence but there is also an infusion of error.
A church that grows together in its knowledge of the Bible, and skill in reading and interpreting it, will be in a better place to evaluate the teaching that it hears.
Such an approach does not guarantee immunity from error, but it is an important safeguard against false teaching disguising itself as the truth. Sadly it is often very gifted and well respected men who are lead astray and take others along with them.
In the end, the difference between orthodoxy and heresy is decided by the exposition of the Word of God.
"Error, even when mingled with truth, is like poison in our food. It is a thing much to be dreaded and avoided, to preach what is not true; or what God has never commanded us to teach.
The pastor's of Christ's flock have the strongest motives to induce them to 'take heed to themselves and to their doctrine.' They should be exceedingly solicitous to know what the truth is, not only for their own sakes, but for the sake of the people; and when they do know the revealed will of God, woe be unto them, if they do not preach it faithfully."
Archibald Alexander, The Pastoral Office, p. 15