Fix for multiple filter_with definitions

Deleting elements from an array that is being looped over results in some elements not being processed. This fix instead loops over a copy of the array to prevent skipping every other filter.