Bitvector testcase and corresponding bug fix.