Trying to modify Bit_array throws 'Invalid_index_access'