It is true that some of the heretics may believe in what they are doing, but as you also said, they believe "that the Church had slipped into error." So, we may identify people quite easily this way: are they teaching what the Church has always taught (Orthodox) or are they saying the Church is wrong, somehow in error (Heretics)? When it is put that way, I think it is quite clear.ozgeorge said:Montalban, calm down and listen.
Those who develop what turn out to be heretical teachings also believe they are defending the Truth of the Church's doctrine. No one ever developed an heresy with the direct intention of "attacking the Church". Everyone on both sides of a doctrinal dispute argues that they are supported by Holy Tradition. Heresarchs believed that the Church had slipped into error (eg. just as Nestorius thought that the title "Theotokos" was heresy.) The Church needs heresy in order to clarify the truth apophatically.