Fix Python code generated in `solvePattern` case.