This occurs because replSetReconfig can sometimes cause the primary to step down and the reconfig in ReplSetTest initiate does not account for this. The reconfig helper is a good example of how to handle reconfigs safely.
The one concern here is that post-
SERVER-20844 we make the assumption that nodes is primary after initiate is called. We should ensure that this guarantee is still met, even if the primary steps down during the reconfig. In 3.4 and 3.6 we can use stepUp to accomplish this, but in 3.2 (if we backport SERVER-20844 that far) we either have to accept rare BFs or step down primaries repeatedly until node 0 is elected.