Clear cached MST when changing graph structure