Handle more syntax errors in pattern matching.