Fix the bug that bitmap.begin() == bitmap.end() is always true when the bitmap contains a single value.