This fixes #8216.