Instead of creating a descendant class, create a wrapper class that includes the ancestor class as an attribute. So the descendant class would look like this as far as instance variables.
baseclass common
string world = "world"
In the method where you are going to pass that back, you determine whether or not the common attribute gets created.
childclass obj
obj = create childclass
obj.common = create baseclass
etc. etc. etc.
return obj
Rather than a flat structure you get a nested structure, with the base attributes in the "common" (as I called them here) branch.