Fix get_courses to handle inflight changes

more rigorously.

@cpennington if you don't have time to review, please punt to someone capable
@mattdrayer @ziafazal this should fix your problem. please review and confirm. (I did red-yellow-green TDD)

No, immediate is fine for the moment.