Issue #16828: Fix error incorrectly raised by bz2.compress('').

Initial patch by Martin Packman.