Fixed #6321: Implemented function Token::swapWithNext().