Most revert latest changes to r_poly.c