Properly handle namespaces in +o proxy code generation

Nested namespaces were copied verbatim instead of applying namespaces nested as is done in the JNI generator.