fix potential name conflicts in generated code