Fix a number of compile-time errors in generated objects