Turns out the knocking noise was a crack in piston #6 skirt. It finally started to clunk instead of knock, so I pulled the oil pan to find a big chunk of the piston in the bottom of the pan. So I pulled the head again and pulled out the piston, and found that it didn't damage the cylinder wall somehow, so I honed it out and slapped in a new piston and rod. I have put about 5,000 miles on it since then, and it is running strong and no more knocking noises.
To diagnose the piston noise, I unhooked the power to 1 injector at a time, listening for a change in the noise. When I unhooked injector 6, the engine was much quiter, so I assumed that was the bad piston. Pulled the pan, and that was correct.