Add support for domain objects that are in a hierarchy where some parents are generic types.