sha1_loose_object_info: handle errors from unpack_sha1_rest