This fixes #8007.