Make pkgng work again

Ticket: #4157
Ticket: #4156