Refactor

to avoid such a leak, we could pass the flags via paginator options (like we do with `distinct`).