Fixed a few more problems with pattern matching and proof search.