[DF-2550] correct loop through commands list, when removing them