Fix a logic error in the condition for a warning log message.