SERVER-13635 Fix legacy replication code locking behavior