Bug fixes, performance improvements in the invalidity heuristic.