Handle nested classes properly for method invocation in the preprocessor