The screenshot below demonstrates one of the glitches I had during my recent playthroughs. Basically what happens is that if you hit an enemy with an elemental bolt (for me it happened with incendiaty and shock bolts),
sometimes additional debuffs such as Fear or Stun do not apply at all, and instead temporary immunity kicks in.
During the turn that is depicted on the screenshot I shot an enemy and successfully set them on fire, but instead of Fear, Aphobia immediatelly applied.