Cpp: Fixed circular reference issue. Adding the directive_* functions in the CPP object to the directives mapping causes circular references. Switch to looking up the directive functions directly instead.