reduce_rational_inequalities: substitute correct polys for True/False

fixes #8545