I'm not sure the store is limited to the courses that are created. There is a second variable that is returned which just has the course modules. Can you use that instead? 

As far as I can tell, @chrisndodge wrote the code that returns course_items. So perhaps he can explain why course_items and the store are both returned.