WGT extract before setting is_valid_ to true, but XPK package do conversely, that's why we need a flag to point out which type the package is.