Optimize output size of kpm pack

parent #652 
Not quite defensive enough. The dependency might not be there at all.