handle indices >2**31-1 on 32-bits (or attempt to, anyway)