Fix a nesting bug in CPP