Planetesimals and their precursors in protoplanetary disks are very porous. Thus, a gas flow around such bodies will be accompanied by gas flow through them. We calculate how this gas flow will influence the impact of a small body on a body larger than 1 m in size. On the front side of a large body (target) with high porosity there is a boundary layer that is characterized by a gas flow toward the surface. We find that under typical conditions with respect to collisions in protoplanetary disks, fragments of a collision will stay inside this boundary layer. These fragments will return to the target by gas drag. Net growth of the larger body in these secondary collisions will occur. The mechanism works for all sizes up to planetesimal size. This supports the idea that planetesimals (kilometer-sized bodies) build up from collisions of smaller bodies. Subject headings: hydrodynamics — planetary systems: protoplanetary disks — planets and satellites: formation — solar system: formation