This fixes #8117.