Issue #5731: Optimize make package