Just leave the Intellect Devourer on the restoration pad during the final fight and keep clicking it and it will give you unlimited spells during the fight to whoever picked it up originally. Usually works with any picked up character beyond the 4 limit.

This should be fixed at some point I hope.