Add tests for #5075