Change `cancel-message-thread' from a parameter to a normal variable.