Thanks for pointing that out. The one in PageLoad is only needed when its a cross page postback from another page, not when the search button on the page is clicked. I will fix it like this:
if (Page.PreviousPage != null)
if (this.query != string.Empty)
Cross page postback occurs if the skin (layout.master) has the SearchInput control set to LinkOnly=false (see styleshout-refresh skin for example). When configured like this there is a search input on every page instead of just a link to the search page and when a user searched using this input a cross page postback is made to the search results page. If its not a cross page postback then Page.PreviousPage will be null.