Thank you for asking your question on Just Answer
The common concern for the lean codes 0171 and 0174 is leaking intake gaskets. Ford has an upgraded gasket set and this leak will not effect vacuum reading as it is internal. Replacing the upper an lower gasket will correct you concern. But in some case it can be someting as simple as a bad MAF (mass air flow ) sensor) If you can run this test..
Check the Barometer (BARO) reading for indication of a potential Mass Air Flow (MAF) sensor issue. Check Short Term Fuel Trim (STFT) readings with the engine running. If they are high at the time, nurse propane or carburetor cleaner around potential vacuum leakage points on the engine, and pinch the vacuum lines closed to see if the fuel trim readings drop, pinpointing the source of the leak.Normal BARO Hz reading is 155-159 Hz at sea level and drops about 3 Hz for every 1000 feet gained in altitude. The Powertrain Control Module (PCM) calculates the barometric pressure from the Mass Air Flow (MAF) sensor input under certain Wide Open Throttle (WOT) modes of operation. If the MAF is cleaned or replaced, perform an adaptive relearn on the PCM by disconnecting the battery negative cable. After reconnection, start the engine and monitor the fuel trim readings and BARO reading, during and after a test drive, to verify normal values and that the problem is repaired.