Match changes in WikibaseDatabase

This matches https://gerrit.wikimedia.org/r/#/c/76718/

Change-Id: I0c41f3f1fbd63ba0792a49254665990126652bc6