“Good works do not make a good man, but a good
man does good works; evil works do not make a wicked man,
but a wicked man does evil works. Consequently it is always
necessary that the substance or person himself must be good
before there can be any good works, and that good works
follow and proceed from the good person, as Christ says ‘A good
tree cannot bear evil fruit, nor can a bad tree bear good fruit’
(Matt. 7:18). It is clear that the fruits do not bear the tree and
that the tree does not grow on the fruits, also on the contrary,
the trees bear the fruits and the fruits are grown on the trees.”
Martin Luther, “The Freedom of a Christian” (1520).
The very heart of the gospel is at stake with the interpretation of Matthew 7:18. It is Christ, and Christ alone makes us "good" and He sanctifies our works. Any working to prove that one is a Christian is works-righteousness. Good works certainly have to be in the life of a Christian, but they are a result of Christ's salvation, not a striving to prove that one is a Christian.
What does EVERY false doctrine distort? The Gospel of Jesus Christ. That He, and He alone, saves us and produces fruit in our lives is what is always compromised when doctrine becomes distorted. It is by His Gospel alone that we are saved.