Only insert packages belonging to the same target into TargetInfo.packages.