random: avoid generating warnings with -Wshadow, fix #9115