Another bad case: though diff(x,1) and diff(x,2/3) give errors, diff(x,rat(2/3)) does not.... Simple fix: add a check for $constantp to nonvarcheck.