Fix looping in pid dump.

I'm not sure how many more ways I can get this wrong.