Fix a log message getting output when it should not have been.