More tests for #6135