Tensor.set_ seems not to correctly update metadata if the shape changes

I am not sure why this is happening in a flaky way. On my machine, it always works when you del out.