Consume all enumerators created by gzip filter (backport 2.2.x)

Backport of #2362