I can't recall it happening with any troops beyond the spear-wielding ones [Guards and Elites both], and I think it's happened once with D'Kah himself. And I'm fairly sure the unit only has to have been on the square in a past turn, not necessarily died on it. I seem to recall guardsmen in the second battle of the final mission [right after D'Kah] blocking my way to the Energy Golems and the Elite in the corner when I don't believe I'd killed any over there, though maybe I Light Bombed one or two... If I can replicate the bug and take screenshots, I can confirm this.
Sorry, I regret my strong language on the matter. Sometimes I forget you're only human. I came here right after a go at the final mission that was going quite well until I had to quit as a result of this bug, so it was pretty fresh in my recollection. ><
EDIT: Oh!! I've figured it out! It puts the phantoms on the tiles that they could hit with their attacks! For a Guard and Elite in this picture, their stats appear on mouseover of the two tiles in front of them. When I used the Tab key to scroll through all the buttons on the screen [since Flash has that feature, showing the rectangular BoundingBox in yellow], it revealed that the extra tiles were part of the unit itself, or at least part of its button.
So I guess I wasn't surrounded by a single unit, but rather by two units at 90-degree angles from me, and the far part of their attack. The strange thing is that these phantom tiles are impassable. It doesn't seem to happen with the Bowmen -- just the spear-types, and possibly D'Kah. I hope that's enough information to be helpful.
Also, confirmed that it only happens on turns where X is pressed or the ? button is used.