MDL-38541 rebuild_course_cache() should never be called from upgrade script