Fix ASAN crash in pkzip format
make valid() "stronger"