Fix issue with multiple fields with the same name being generated.