Instances ambiguity fixed

Fixed ambiguity in querylib queries (deleted=0 -> instances.deleted=0).