Inclusive measurements of pion production in proton--proton collisions in the forward direction were undertaken at 400 and 600 MeV at COSY using the Big Karl spectrograph. The high resolution in the π+ momentum ensured that there was an unambiguous separation of the pp→π+d/π+pn channels. Using these and earlier data, the ratio of the production cross sections could be followed through the Δ region and compared with the predictions of final state interaction theory. Deviations are strongly influenced by long-range terms in the production operator and the tensor force in the final pn system. These have been investigated in a realistic pp→π+d/π+pn calculation that includes S⇌D channel coupling between the final nucleons. A semi-quantitative understanding of the observed effects is achieved.