Fix #21160: in_bulk fails on SQLite with more than 999 ids