Add tests for #9441

/cc @guilleiguaran