Carl Trueman nails it:
As recent events have shown, churches contain perverts. Churches contain perverts who are Christians. Churches contain perverts who are Christians who do real harm to others and to themselves in their sin. And pastors are called to confront such people, to protect the flock, and to ensure that civil authorities deal with them.
But they are also called to pastor such perverts, to call them to repentance, to faith, and to lives that reflect their status in Christ. How is that done? Our theology of the Christian life needs to be able to address all Christians in their sin in a consistent manner. (Emphases mine.)
Read Trueman’s post on how sanctification and justification have significant, and often difficult, pastoral implications here.