The Man in Black, who is also the smoke monster, did NOT invade Locke’s body. Locke’s body is whole and unpossessed, lying dead on the beach. What the Man in Black did, somehow, was create a replica or clone or apparition or some sort of image of Locke’s body for his own use.
I don’t know if this is relevant in any way, but I’ve seen too many people describing Locke’s body being taken over or possessed and it simply is not true.
This may or may not play into scenarios people are floating about Jacob taking over Sayid’s form. What also might play into that is the fact that we have no evidence the Man in Black died before taking Locke’s appearance. Jacob certainly appeared to have been killed. For Jacob to do with Sayid after death what the Man in Black is doing with Locke would take one more ability than we’ve seen from the Man in Black so far.
As always, take this for what it is.