Fix assertion failure with null pkgname (Bug #830)