Vlamirs patch for automatically simplifying e.g., csgn(x)^3 -> csgn(x).