Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45691 Prevent generation of duplicate variable names.