I have had the exact same issue on my 1015 Forester with 2.5 since we had it and have gone back and forth with the dealer. It only has 47,000 miles on it. It has done that since we had it and always did it when the AC was on but excelerated quickly and smoothly with it off. I don't know how many times I told them it had something to do with the AC, and treated like I didn't know what I was talking about. Finally after having brake lamp switch replaced, I found a service bulletin related to the AC effecting the ECU causing the issue. It was not explained that the noise from the compressor effecting the knock sensor. I informed them and was denied again. The AC never worked good and the blower fan went out before 20,000 miles and finally they replaced the compressor, and evaporater. But that didn't change the problem with the erratic exceleration. Also it causes the system to use to much fuel as it averages 21 mpg and when changing oil there is fuel in it. Recently I brought it in because it was lunging pretty bad and found out the right front bearing and control arm bushings where gone. I assume the long term effect from the AC problem has put strain on the bearings and bushings. Anyway I never contacted subaru or filed a complaint with Nhsta. Is there a known resolution to this problem now. Maybe a better aftermarket compressor or ecu flash. Or anything else. I might add that they changed the differential fluid just after 30,000 miles and charged us for that.