New tests for #8368.