Four of the seven base58 declarations are strictly unnecessary.
Note there are randomly generated test calls to DecodeBase58Check that would violate the unenforced max_ret_len > 0 expectation of that function, but not the effective max_ret_len + 4 > 0 assertion enforced here.