small optimization to bitarray getindex