Fixed a regression in 0ee095b7b0766073d384ae558e33b73af8c47754 that caused occasional download corruption.