Test case for #9305