I think I finally figured it out! If someone could confirm the following, or correct me, I'd appreciate it.
When using instanceof, if a class is final then a reference of that type must be compared to that class or a superclass or an interface that it or a superclass implements. Won't compile otherwise.
If a class is not final then a reference of that type can be compared to any interface or to a class higher or lower in the inheritance chain.
The reason a non-final class can be compared to a seemingly unrelated interface is that it may be extended by a class that then implements an interface. So you can't be sure, for a non-final class, that an interface won't be implemented further down the inheritance chain.
I can't tell you how long I've been struggling with this. And of course I'm to stubborn to ask without trying to figure it out first.