avoid looking up part_pkg redundantly in the pkg loop, RT#5083