porting C backend to new top_level_scopes API