Sorry, if my advice was not helpful. As you never specifically said what you were needing. However, just because he is masturbating, doesn't mean he will sexually mess with the baby.
A lot of boys and men masturbate and it doesn't mean they will mess around. However as stated above, you should still talk to him and let him know the rules of masturbation. In his room, the shower etc.. (whatever you feel OK with)
And as any concern Mom, do keep an eye out between your son and the baby. But unless he has had problems in the past with other children, then I wouldn't worry this will occur.
It's all new to him as well.
I don't have a lot of information to go on from above and don't usually like to assume too much without more information. But just to make sure I am understanding your concerns, it could be that you are worried if your son would do anything to the new baby, or if you feel you being pregnant was caused by the semen in the panties.
Can you clarify just so that we are on the same page here?
Hope this helps Hun, if you need anything else or if you have any other questions, please feel free to ask.