(#3062) - fix mapreduce error

Sorry for no tests; I wasn't sure what exactly was needed to get a failing test.

In any case, we already have some failing tests: the mapreduce tests. I'll open up a PR over there to demonstrate that this fixes the issue.