TGV deletes are a modification where you remove the tumble generator valves located at between the intake manifold and cylinder head. Unabomber has a good write up on them
here.
If your TGVs have not been removed, they have probably failed in some way. It's not an uncommon failure on older Subarus. You can look into fixing the problem or removing them and disabling the associated check engine lights in your tune.
For the P0171 code, do you have an Accessport or any way to datalog the car? Without more information and just making some guesses on the P0171 code......your front O2 could be worn out or your MAF sensor could be faulty. You could could have developed an intake leak (possibly pre-turbo). The scaling for your intake and/or injectors could be off in the tune.
Until you get the P0171 code sorted out, I would not recommend driving the car aggressively as it could be dangerous.
- Chris