Pass build_s_matrix a kproblem instead of just a matrix.