Fixed a bug in the allocator which could cause filters to be
unnecessarily installed.

Review: https://reviews.apache.org/r/25207