Commands already in history should not be inserted again. Instead these commands should just be pushed to the 'top' entry in history.