Fix pkg query %M printing (null)

Reported by:	flo