I started off a fight by casting Mind Blank on a character - only to have that character become sleeping due to an Arrow of Sleep.
It appears that the immunity check is made in the code for each spell/attack, rather than in the "apply condition" code (e.g., "apply sleeping").