Match changes in Wikibase QueryEngine

Change-Id: Ice93e116587896d5d2c82f9943b0aab27685cacf