Replication fixes and more fine grained handling in the peer map
testcase fix for peermap changes