(#18110) spec tests for bug fix