rhogen: fix problem with incorrect return types in callbacks and results when using lower-case text