Fix get_courses to handle inflight changes
more rigorously.
Merge pull request #6329 from edx/dhm/bug_split_index

Fix get_courses to handle inflight changes