MULE-7293: Check debug state before log stacktrace.