Luke
I think it's unlikely it's P1170 is that not fuel injector, I believe it is.
You fitting headers has nothing to do with unless you've disturbed something, which again is unlikely.
Logic dictates if it was running ok before it has to be in my opinion an unmetered air leak of some kind,when I did this work on a 996 Turbo I had exactly the same kind of probs (different codes obviously) and mine was a slightly distorted Airbox letting in unmetered air, upon refitting I would check all the clamps and so on for the box, maf and so on and see.
Big Rat