(ITS#7817) Wrong if condition for string length