Attempt to fix #375

Do not merge.
For code review only.

cc. @akkadotnet/developers 

This is my attempt to solve the race condition in the mailbox.
I think this will do it, but need review.