Fix a blatant bug in restore_current_matrix.