(#15841) Ensure gzip stream is closed.

Nest code to a block passed the a GzipReader to ensure the gzip stream
is closed after the code finishes.