Fix debugger crash inspecting freed object.
Fix debugger crash inspecting freed object.

This seems to be the correct way to validate a reference.
Why is cast_to failing?

(cherry picked from commit d8ba07ea8f2a17e77549c56ce8eddcbc2fcead7c)

ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot