Fixed handled message logging bug.

If a message wsa handled more than once, it would have been logged more
than once.