Fix handling of sub classes of traced classes.