Fixed permissions in Query::setFromSelf