Because Location encodes the course id, get_parent_locations guarantees the correct course.