Fix failure to compute distance in scm_step::set_matrix.