As a small optimization for the general case (no feature filter at all) we could create the object only when actually needed, in the queryLayers loop:

```js
            for (j=0, jj=queryLayers.length; j<jj; j++) {
                if (!featureFilters) {
                    featureFilters = {};
                }
                featureFilters[queryLayers[j]] = featureFilter;
            }
```

And, as a bonus, we no longer need the `haveFilters` boolean variable, we can test if `featureFilters` is defined instead.