The fix was adding `is_constant = false;` I also removed the unnecessary check regarding the first element of the BitSet, since it's checked inside the loop, and also fixed a typo in the message.