Fixed a bug in the threaded version of reduce that could cause too many threads to be created.
Fixed a bug in the threaded version of reduce that could cause too many threads to be created.

bh107/bohrium,madsbk/bohrium,madsbk/bohrium,bh107/bohrium,madsbk/bohrium,madsbk/bohrium,bh107/bohrium,bh107/bohrium