Fixed instances.deleted abiguity in querylib

I meant to do this.