foreach-by-reference does not keep `list<T>` property on reassignment

Bug report

When I iterate the values of a list<T> by reference and then reassign them, the array loses its list<T> property (even when it's impossible for the reassignment to change the structure of the array).

Code snippet that reproduces the problem

https://phpstan.org/r/94ed7e0d-6998-4347-b9cf-2f4b7847fa78

Expected output

I expected the dumps in example() and example2() to both be a list<T>.

Did PHPStan help you today? Did it make you happy in any way?

No response