Moved query merge to be included in both possible redirects