Replace the random widget with the randomly selected widget.

From #5426.