This fixes #8221.