fix path pattern matching for packing by group