fdo#75339: Substituting XInterface* eq. for object eq. requires queryInterface

Regression introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "Use the new
type-checking Reference constructor to reduce code noise" which should have left
(at least some) "querying upcasts" to XInterface alone.  Closer inspection of
that commit will probably turn up further regressions that need to be reverted.

Change-Id: Ib81afc12d9df205b5b0fe6cec6ce85d012e9629f