Add tests for #7083.