Yanfly Skill Core issue with multiple attacks

I'm applying a State to the Attack Skill when it is used if certain conditions are met:

Code:
<Before Eval>
if (user.isStateAffected(4) && user.attackMotion() === 'missile') {
user.addState(7); }
</Before Eval>

<After Eval>
user.removeState(7);
</After Eval>

It works. If the character is in the front row (State 4), and attacking with a missile weapon, they get a penalty to their HIT (State 7). It then turns off afterwards.

Except...if the character makes multiple attacks with their action--either because I set the Skill Repeat greater than 1, or because they have the Attack Times + trait, the state only applies on every other attack. It works on attacks 1, 3, 5, 7, 9, but not attacks, 2, 4, 6, or 8.

Has anyone run into this? Any ideas of if there is a fix?
After Evals trigger anytime damage/healing is dealt, so if you have an attack that hits multiple times, it'll trigger the After Eval multiple times. To work around this, if you're using Action Sequences, you could just remove the state at the end of the action sequence itself.
Well, I guess I was planning to be using Action Sequences eventually anyway (I need them to have the characters move up when they attack in melee). The reason I haven't implemented them yet is that they don't play well with Repeat attacks either, and I have that set on 9 for testing purposes (easier to see the results if I can get a lot of them at once).

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-core-issue-with-multiple-attacks.106589/