I'm thinking about it and I don't think a boost leak would make it run lean. More like rich, if it's not getting the right amount of air.
100k miles? Did you do the 90K maintence? Change the timing belt, spark plugs, and flush all the fluids? What is your CEL? The last time my car threw a lean CEL, it was because the front O2 sensor took a shit after my motor swap.
I looked at Impreza Manuals | ken-gilbert.com
and under 02-03 manuals. It said the P0171 was a fuel trim malfunction (A/F too lean). Meaning you have too much air and not enough gas. I'd think that would be in the fuel system. Like a crapped out injector, fuel pressure regulator, or crapped out fuel pump. I don't know if i'd drive it too much more and I'd have a trusted tuner or dealership look at it. If you have a trusted tuner....go there first. Because if your car is starved for gas and you drive on it too much or hard. You could really mess the car up; like frying a piston or breaking one.
Edit: I'm still reading the manual. Here are the first Diagnostic steps that a tech would check for both lean and rich fuel trim malfunctions.
1) Check the Exhaust system (repair any leaks, holes, or loose bolts)
2) Check the Intake system (repair any leaks, holes, loose clamps, or disconnection of hose on air intake system)
3) Check fuel pressure (too many damn steps to list...check read this stuff on the DOHC Engine link and its under pdf page 377 and 378)
4) Check engine coolant temperature sensor
5) Check pressure sensor
6) Check intake air temperature sensor.
Man, I'd fix the gasket and go back to stock intake and BPV. If that doesn't fix it...definatly take it in.