nbconvert: Fix coalescestreams line with incorrect nesting causing strange behavior

Closes https://github.com/ipython/ipython/issues/4015