Fix handling of some abstract/empty class hierarchies.