Avoid storing duplicate message id in ScaleoutStore

#2988