Added test for #7667.