Merge issue #16377: Fix bisect unittest.

Patch by Yury Selivanov.