Fix bug in iterative SR solver
Created by: femtobit
During the changes to the SR in #257, a bug in the iterative solver (causing an Eigen assertion error) was introduced, which is fixed in this PR.
Also, this PR adds test cases which run the iterative branch of the solver to detect regressions like this in the future.