Figure out which page has a link to our file and has categories all in one query.  Simplify things.