There has been much speculation that not-Locke (AJ, MIB, Esau, Nemesis, Dick, et.) is in fact the Black Smoke Monster. The evidence used to support this theory is his timely disappearance while Ben is in the temple being judged by Smokey and then confronted with an apparition of his dead daughter demanding than Ben swear his allegiance to John Locke. Proponents of this theory believe that not-Locke conveniently left the area so he could shape shift into the monster and (or) then Alex to insure the success of his plan to have Ben kill Jacob. This makes sense if you believe Nemesis and the monster to be one in the same. I don't.
I think not-Locke beat a hasty retreat specifically to avoid an encounter with Smokey, who would have recognized him in a nano-second, like Jacob did. As the security system, Smokey's job is to protect the island, and the island is often synonymous with Jacob, so it doesn't make sense to me that Smokey would willingly allow (let alone participate in) any harm coming to Jacob. Not-Locke breached the security system -- that's the loophole.
The John Locke that Smokey knew from scanning him was devoted to saving the island, willing to sacrifice himself for it if necessary, not a threat, and as far as Smokey knew, the rightfully selected leader of the Temple people, his people (aka "others"). Knowing Ben intimately as well, Smokey wanted to make sure he didn't usurpe Locke's authority, hence the apparition of Alex.
For not-Locke's plan to work, John had to die off island so Smokey wouldn't know about it, and his dead body also had to be kept away from Smokey, which is why I think the Ajira flight crashed where it did (a place Smokey seems restricted from getting to) and not on the main island. Smokey was long conned.