Add runtime assertion for Solver::unsafe_add