This fixes #7718.