Small change to linear rail calibration code to prevent stalling if new max is
smaller than old max.