packer: fix required var check to work properly