Workaround for segfault when sending a message after the model has been replaced

The proper fix would have to be much more intrusive. Let's leave the bug open
for a while, the current experience is better than segfault, but still leaves
much to be desired.

refs #640