Fix constant patterns for matching.