The MAF apparently reads barometric pressure and so it is possible that a fault in the MAF might be affected by barometric pressure changes. In an article about P0171 faults I came across the following which may be of interest:-
"There is a very effective "truth test" for any Mass Air Flow Sensor. Start the engine, let it idle, and then check the Barometric Pressure reading on the scan tool data. If the reading is about 26.5 Hg and you are close to sea level, you know that you have a defective Air Flow Meter because it is telling you that you are at about 4500 feet above sea level. When the Mass Air Flow Sensor sees this Barometric reading, it adjusts its Air Density table and then "under reports" the actual amount of air entering the engine. It does this because the Barometric Pressure Sensor is actually part of the Mass Air Flow Sensor.
Sometimes the Air Flow Sensor and the sensing wire get covered with dirt, dust, or oil residue, which can also set a P0171. Cleaning the sensor might hold off problems for a while, but eventually, the MAF sensor should be replaced. Always make sure the Air Filter and its enclosure are dirt-, dust-, and oil-free. If you clean and replace the filter and its enclosure as needed, you will prevent the new MAF from failing."