Defensive code in the unliely event we have two messages with the same msg when calling getInboxMessageById and getSentMessageById