Store compilation flag at specified index in context's shared data.

def _check_index_in_compilations(context: BaseContext, index: str):
    """Store compilation flag at specified index in context's shared data."""
    compilations = 'compilations'
    if compilations not in context.shared_data:
        return False
    return index in context.shared_data[compilations]