Use "random_leader" only when resolving random.

Fixes bug #21218.