ENG-6082: Address review comments: be less dumb about superclass
detection.