If you have the stock intake, I recommend installing it first to see if that fixes it. I have had the exact same symptoms you describe, and after a lot of research through these threads, it sounds like many different issues can cause these symptoms. Some people claimed success with their stock intake. Unfortunately, I no longer have my stock intake, but I'm beginning to suspect that the K&N setup I have is at least part of the problem.
I checked for vacuum leaks, inspected and cleaned the ICV, (the code I had) and it didn't help. The reputable indie out here hooked it up to his diagnostics computer and said it was most likely a faulty steering angle sensor (apparently what their computer said). Sounded like an odd solution to me, but that shop has a stellar reputation, so I went ahead and shelled out for the repair. Two weeks later, my car started acting up again. It still happens every couple weeks or so. I don't think it's anything that'll be detrimental to the car in the long run, so I'm not worried about it for now.
Which aftermarket intake does your car have? Is it a dry or oiled filter system?