On the role of secondary pions in spallation targets