Bug report
When returning a non-nullable object from a nullable field and the code ensures that the value is non-null, method calls on the object inside the conditional can break the nullability erasure.
Code snippet that reproduces the problem
https://phpstan.org/r/d003958b-29d9-4957-a726-fdce34a19bf5
Expected output
No errors. When the method call is commented out, it works as expected:
https://phpstan.org/r/aadf2811-f2b6-4f8d-8116-77cb1fbcae14
Notes
I don't think there are any possible method calls that could set the parent object back to null, other than some very specific and bizarre actions on the Closure class. If the parent object was passed into the method then some really bad code possibly could, but not in the simple case in the example AFAIK.