This happened the first time I went through the Sancre Tor prison during the blood of the divines quest. When I reached the quest marker, I found that Valdemar's ghost had already spawned & was dead on the floor. I killed his skeleton anyway thinking that might reset his ghost, but it made no difference.
The quest updated saying that all 4 undead blades were defeated & redirected me to the shrine room. However since the dead ghost couldn't get there, the magical barrier would never be lifted, making it impossible to progress in the quest.
I tried the prison area again, sprinting all the way to the end so I could check on Valdemar's ghost. He was already spawned in but at least alive this time. He didn't do anything after I killed his skeleton though - seems similar to the issue described in #35387. So I had to kill the swarm of wraiths that chased me through the prison, then wait an hour, & finally he made his way to join the rest of the blades which allowed me to complete the quest successfully. This bug is also reported on the quest's UESP page.