Ok Ive just looked at the Workshop manual for the Gen4 (Its American version of the manual I think but should be the same)
The front oxygen sensor (AF) is located just back from the turbo, infront of the first cat.
Reading the troubleshooting for this sensor they talk about loose connections etc. as being possible causes for the warning lights (logged code ) to come up. Its only after these are checked and proven to be not the problem that they should replace the sensor, according to there procedures to follow.
This is important to me because Subaru had only just been working on my car not 10 minutes before I started getting the code. I had a new key paired to the car.
I wonder how accessible this sensor is. Id like to eyeball this sensor and see if its loose.
If youd like a copy of the Gen 4 manual you can find it in the first post on this page. Its a 130mb download (from memory)
http://www.ozliberty.com/forums/showthread.php?t=1101
Once you have it go to the "engine diagnostics" folder (folder 10) then go to pdf 4 -"Electrical component location". Scroll down to diagram 10.