Fix the slowness of bitmap index checking