Fixes TempEffect crashing in copy_spell.