Fix Kruskal bug with mst limit in debug mode.