I'll take a look at the code to see if missing spells would affect the target-action sequence.
If you placed a detrimental spell when a beneficial spell once was, that 'might' be an issue..but, I can't be sure without checking...
Someone else may (feel free to) chime in before I get back though