Sending a double message for action to occur
I do not have and ethernet shield at this moment to test on it your code but hopefully the next observations will help to solve your issue.


  If I send the command again, the Arduino does not turn on the LED,
  unless the command was send twice, consecutively.


It seems that your string is not correctly processed, probably caused by "garbage" from previous received string or incomplete string. I think is from this part of the code

 if (client.available() &gt; 0) {
  char thisChar = client.read();
  command += thisChar;
  ProcessCMD( command );


You are trying to append a char (one byte) to your command string; by doing this you are not getting the received string necessarily because the "+=" is for retrieve char by char (for example, inside a while loop). First try to print thisChar variable to ensure what are you getting and also you can print client.available() to see how many bytes you got.

Second, for your ProcessCMD function it could be better to use pointers to handle the command variable, meanwhile you must clean command variable always (and not only when CMD.lenght &gt; 11 ), i.e,

if(CMD.length() &gt; 11){
  command = String("");
}


must be at the end of the ProcessCMD function

  command = String("");


Also you can ensure that when you set UP=true, also set DOWN=false and so on. I prefer the Switch-Case structure to handle commands.

Try to follow arduino examples to better understand. 

Cheers.