The _query variable is not available in the pagination tags. I had to use the 'var' add-on to get it in there.