These patches apply on top of my previous query.c patches sitting in Allan's working-split/query-owner branch. Also available under the dirowner_split branch of my repo at https://bitbucket.org/andrewgregory/pacman