Backport the pkgng 1.2.x fixes to 9.2