Add solvePatternGuard