Found a bug in chebfun base