Backport of filter setting optimizations