Handle broken archives correctly.

Test: Manually and automated tests.
Bug: 32260433
Change-Id: I2c701c34184b7bb2954e28954398e0634ee0c4a1
(cherry picked from commit 40cec2ae53d637e186d0f6de105df4859bef2201)
10 files changed