Fix #8193, take 2.

Cc: @jakebolewski, @ivarne