Hi, long time reader. First time poster. After rewatching seasons 1-4 and selected episodes of 5, I began to really see a connection to all the "undead" activities and Jacob's Nemesis, specifically in seasons 3-5. Mainly, I think that the Nemesis hasn't been just masquerading as John Locke for half of season 5. I think that he's been taking the form of people whose bodies have wound up on the Island. It was Christian who Locke found in Jacob's cabin (if it did indeed belong to Jacob). Christian also confirmed that Locke would have to die (after UnLocke told Richard to tell real Locke that he must die). Alex told Ben to do exactly what UnLocke told him to do (i.e., kill Jacob). The only apparition that isn't explained by this is Walt. Walt, of course, is still alive and was off island when he appeared to Locke.
The point is that all of these undead apparitions have spurned Locke on in his doomed mission. I'm sure that their purpose hasn't been singular, and it doesn't account for everything (Yemi, Kate's horse). The producers have said or strongly hinted that these "undead" beings were different manifestations of the monster. Perhaps the Monster and the Nemesis are one and the same (this I find hard to swallow) or closely related.
I'm sure that this has been thought of and posted before, so please don't think I want to steal anyone's theories. In fact, feel free to discredit, redirect, or flat out disagree with this. And if someone has posted this theory before, I'm very sorry.