Record last commands only once (Bug #15767)
First check the history (model->items_hash) if the command is already in. Only if the command is not in yet, add it to the history
First check the history (model->items_hash) if the command is already in. Only if the command is not in yet, add it to the history