fix to runtime error caused when removing a lightpicker from a material
with a shadow caster