Think it has to do with sight. A Light Spirit will never cast on an invisible person. I'd assume dead people are considered "invisible" to the pets, so they'll ignore them and not attempt to cast spells on them.