Fix filter indices when batched
_The documentation is not available anymore as the PR was closed or merged._ I think a patch release will be necessary. I'm also fixing https://github.com/huggingface/datasets/issues/5111 which will lalso require a patch release
This PR fixes a bug introduced by:
- #5030

Fix #5112.