sha1_loose_object_info: return error for corrupted objects