Fix Issue #5985: sprandbool() fails and does not have unit tests

Fixes an issue where sprandbool fails