Fix passive pets not using spells when commanded to attack

Closes #8941