Improve handling of inheritance and defaults.