fixes error cutoff issue #276

This fixes #276

Note: the tests `when_map.js` and `when_reduce.js` never complete, so this pull request may still be having some problems

Assertion that gets stuck in when_map.js:

"should map input when mapper returns a promise with concurrency:"

Assertion that gets stuck in when_reduce.js:

"should reduce in input order:"

Edit: these are probably unrelated to the PR, as the same thing happens when I run the tests on current master