A also found 3 tsb's on that code P0171 that confirms the possible causes. They are here, here and here.
The first tsb, talks about the fuel injector connectors are crossed or incorrectly installed.
If they haven't been worked on lately, I would just ignore this one.
The second tsb discusses the Use of fuel containing greater than 10% ethanol in non-E85 designated vehicles can cause driveability issues.
The third, about clogged injectors.
What I would do is first of all if you can remember if the problem started right after the last time you got gas and you remember where the gas station was or have a receipt, check out the labeling on the pump and see if it is U85.
Second, I would run both some cleaner and dry gas through the tank and get rid of any water that may be in there and also try to clean those fuel injectors.
You may even want to drain about 1 pint of gas out of the tank into a clear glass jar and let it sit for about 1/2 hour and settle. Then if you start to see a distinct line of separation between gas and water, the gas has got water in it. Can't remember though which will be on top but I assume since oil floats on the ocean after a spill, then the gas would be on top, so then the line would be near the bottom
Then, I would check the fuel pump pressure and make sure it is 50-57 psi.
Actually I see in that one tsb they mention fuel injector cleaning and using a certain cleaner.