vat2: add sanity checking - coverity errors