Don't crash when accessing turned-off databases or when multiple messages are logged at the same time