Impreza Oxygen sensor problem

I have a 2001 Impreza L wagon (basically the outback sport without the trim package). Two weeks ago I start the car and check engine light comes on. Code is 1130 - front oxygen sensor circuit malfunction. Subaru dealership checks it and confirms oxygen sensor is bad. They don't have the part in stock even though I told them before bringing it in that was the code. After paying the diagnosis fee I take it to a reputable independent repair shop and they again run through the trouble shooting checklist and confirm the sensor is bad. They replace the sensor, which they said it pretty much came out in pieces, with a new bosch replacement sensor. After resetting the check engine light continues to come on with the same p1130 fault code. They say that the problem is the computer that processes the sensor data and that I have to take it to Subaru to get that fixed. Does anyone have any suggestions where to go from here? Is it possible to confirm the oxygen sensor is in fact working? Is there another way to reset the computer or should I just take it to Subaru again?

Yeah, I know Subaru will want to replace the oxygen sensor with OEM part which is what I am trying to avoid. I'm kinda screwed if I have to take it back to the dealer. The other shop thinks it is the ecu and says I need to go to the dealer for that.

Thanks for the suggestions! I had been thinking that the new sensor could either be the wrong one or simply defective out of the box. Good suggestion on checking the wire from the ecu to the sensor. I will ask the shop to check that out. I am also going to call subaru to get the part number for the oem sensor and cross reference that with bosch to make sure they installed the right part. If none of that helps I was thinking of checking on availability of a rebuilt ECU from this company: http://www.ecm-ecu-online.com/Does that sound like a good plan of action?Thank you so much for your help!

I checked with car quest and confirmed that the correct oxygen sensor was used. They said that it was actually made by Denso and is oem. Also, the mechanic confirmed that he had already checked the resistance on the wires from the O2 sensor to the ECM. It appears to me that the problem is in fact the ECM. The ECM is $500 from Subaru. A rebuilt one was not any cheaper unless I send mine in to have it rebuilt, so I think I am going to have to go back to a Subaru dealer. The car was purchased in November 2000 and has 55000 miles so it would be just past it's 7 year/70,000 warranty period. I am going to try and see if Subaru will cover it anyway.