How to ignore anim events on layers with weight set to 0?

I need animation events on layers set to zero to not fire.

We added a string identifier to the event and keep track of the current active layer. If the string identifier doesn’t match the current active layer, we ignore the event.

It’s not ideal.