Praise be to Allah.
The hadeeth mentioned is general with regard to consuming haraam things, and it is one of the ahaadeeth that contain a warning. It does not include foundlings at all, because the foundling has committed no sin, so neither he nor anyone else can be held to account for the sin of another. Allaah says (interpretation of the meaning):
“no bearer of burdens shall bear the burden of another”