The current implementation is dereferencing Reduced and returning them up the chain; but that means that parent nodes don't know the reduction has completed, so the reduction might continue along other paths down the tree.
This patch touches the same areas of code as
CLJ-1040 so will have conflicts if both patches are merged separately. However, as noted in my comment on CLJ-1040, I don't think the patch there is correct yet, so I've also included a commit (7beb14256) to fix the issue in CLJ-1040. Thus, this patch can be merged independently of 1040's patch, solving both issues without a merge conflict.
This patch also includes tests for both issues, which fail before my commits are applied, and pass afterwards.