issue #24200: streamline version bumping

I just moved this function up outside of the other, without changing code.