This fixes #8246.