Without this guard, it would be possible to extend the stream during processing and send wrong blocks forward. This is likely a fix for issue #1400 and #2402