Fixes #8842.