Function getting executed too many times

implementing goat horn enchantments, the way i'm doing it is:

Blow Goat horn v goat horn dummy advancement v execute function v revoke advancement v check enchantment of goat horn v if true : do stuff

I think it keeps getting triggered & revoked. Thus executing 3-4 times. Usually not an issue, but sometimes it really screws with stuff.

i.e. spawning 3 wind charges instead of 1

Any way to avoid multiple identical entities from beeing spawned? or preferably avoid the function from getting executed repeatedly?

Continue to help post