cdx-server: move the matchType check earlier before the remote check happens