I know it's a bit late now but these motors need to be checked top to bottom before ya buy, so many things can go wrong.
That looks like the intake, it directs cold air into the airbox. I'm no mechanic but I would think you would be more affected at speed, not at idle, could be wrong tho, car would not be getting enough cold air, or any air, your maf could be fcuked already, causing the problems your having
Someone with a bit more knowledge can confirm this. A visit to a trader is a defo for you mate