The filter-by-filter optimisation most likely isn't effective when a filter(s) agg is nested under a global aggregation.
We should investigate whether this is the case and if so adjust the heuristics that enable filter by filter optimisation to not enable filter by filter optimisation if this aggregation is nested under a global aggregation.