Good shout! I missed that.

If the listener gets called in the loop it will fire repeatedly over the array loop. If we add it after all the filters are added, it will only fire once and send the array to the listener. Assuming you use this listener to add the filters on another chart, the array will be passed to another filter function and they will all be added!