Bugfix for #9329

Fixes #9329