Fixed yet another bug with proof search.