Better support for QuerySupertype #565