Remove the matching logic out of dynamic path into an extra function. Add the corresponing check to the static component path. This commit was SVN r15458.