Fixes #8480. Thanks for the patch!