Traits like Pyromaniac bugging

Sometimes Traits like Pyromaniac or Apprenticeship trigger after a spell is cast by a perk or trait.

Tested with an Spider Occultist fused with an Djinn Pyromancer. There own Magic Missile never triggers one of their skills, but when one of my other creatures cast a spell 4 times due to Lyra, they cast Magic Missile each time and activate Pyromaniac.