Fixed bug related to duplicate fields after flattening the inheritance hierarchy.