It might be the timing chain. Mine went (2009 S) so I emailed Corolla and told them thats a faulty part because the internet is flooded with the complaints. They offered to cover 1/2 the cost.
But this is me, get yours checked out.
I have the same problem. I changed the spark plugs and filled the tank with some Hess premium gas. All was well. Wifie had the car for the week and let the gas light go on (E) as usual. She filled it up with the cheapo stuff Delta and BOOM, the idle about to die every time I stop started...