improve checks in addPeerFromMsg to avoid doing duplicate work