Yeah, I managed to get the guard out by using the console command which allows you to control the npc as well. With some difficulty I managed to walk him to outside the city walls, then I turned his AI back on and he made his way back to the cemetery and finally the quest started properly.
Thanks.