'Only intended for rather low level methods to use. Goes through the children attrs of
each block removing any whose block_id is not a member of the course.
:param course_locator: the course to clean'

def fix_not_found(self, course_locator, user_id):

    original_structure = self._lookup_course(course_locator).structure
    index_entry = self._get_index_if_valid(course_locator)
    new_structure = self.version_structure(course_locator, original_structure, user_id)
    for block in new_structure['blocks'].itervalues():
        if ('children' in block.fields):
            block.fields['children'] = [block_id for block_id in block.fields['children'] if (block_id in new_structure['blocks'])]
    self.update_structure(course_locator, new_structure)
    if (index_entry is not None):
        self._update_head(course_locator, index_entry, course_locator.branch, new_structure['_id'])
