Adding +1 to the creation of the co-assocation matrix is needed.
Because it's sparse, without the +1 the zero distances are removed, which leads to poor span trees.