The problem you have with using that from the Lord that I put in bold and underlined is that it wasn't the boasting about their works that kept them out of heaven. It is the fact that even though they professed belief in the Lord and did things in His name they still continued to live a lawless/sinful/unclean lifestyle. That is what kept them out of heaven was the sinful lifestyle they lived making all their good deeds useless and as filthy rags.
They believed by doing good here or there in His name gave them the right to continue to live however they wanted to, and did not give up there sinful ways of the flesh.
Even Apostle Paul showed in Romans 8 how being in Christ and walking in the Spirit (fruits/works) thereof is those who abide in Christ and therefor is no condemnation for continuing to do so. As he showed that he could not continue to live and walk as he showed in Romans 7 for that way he said leads to death and not eternal life.
I suggest you study more Kenneth...He never said that they didn't do the works...the problem lies with the path they chose to walk in order to gain heaven....you do realize that most religions teach works as part of salvation and of course many of those same religions teach the casting out of demons and the ability to prophesy in the name of Christ...You can lump almost every religion that names Christ in under those three banners....THEY ALL REJECT a FAITH BASED SALVATION instead OPTING for a WORKS BASED SALVATION......
Broad road that leads to hell-->works, religion and religious exercises
NARROW way-->those who teach a faith based salvation
OPEN YOUR EYES...their problem was they attempted to gain entrance by their WORKS...the door they chose was WORKS instead of genuine faith!