These stepUp functions appear in:
These all try to accomplish the same thing but have different implementations. There should be one stepUp function that makes sure all nodes are electable after it returns. https://github.com/mongodb/mongo/commit/3823a20f0186d0e6b544212fb423f9f0ef786235 contains an example of how this can look.
Alternatively, we could backport
SERVER-20844 to 3.2 to make this unnecessary.