rhogen: fix problems with parameter names and template generation