We can not unify the behaviour for both WGT and XPK packages, since for WGT, need to extract out to get the application ID from config.xml, but for XPK, just need to get it from the XPK package file header, that's the difference between two of them. The "is_valid_" will be set after validate the package, for XPK, it happens before extracting, for WGT, happens after that.