Don't let the query string pile up on successive themes.php searches.

props SergeyBiryukov.
fixes #25270.


git-svn-id: https://develop.svn.wordpress.org/trunk@25679 602fd350-edb4-49c9-b593-d223f7449a82