Fixed cross-module inheritance for cpp