Handle inheritance hierarchies better.