Fix compilation of pattern matching