Revert "stream: Never call decoder.end() multiple times"

This reverts commit 615d809ac684a7d2cc7ee5e1aa58f0a921b529a0.