This is a bug. The WP case of the same tactic already used solve_vals_compare_safe, as it should.
solve_vals_compare_safe