polys: Optimize leading_expv() for lex order