Backport fixes to for pkgng 1.2.x for 9.2