Issue with get_collision_layer()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By fdg23Ak

Hey everyone I have an Issue with get_collision_layer(). I instance a scene, add the scene to the current tree, and then get the collision layer of the scene. The mask is set 1. However get_collision_layer() returns not 1 but 2147483649.
I updated Godot to 3.2.4 rc1 in hope it fixes the problem. It actually did and it properly returned 1 this time arround, without me changing any code at all. After changing some code and restarting the engine it doesn’t work anymore however. No matter what I do it’s back to 2147483649. Any ideas?

Edit: So I have found a way to get it working again. The node I was instancing was a KinematicBody2d. The parent of these instances already had a few instances as children, these were not instanced by code but by the editor. I deleted all of these instances and tried it again, this time it worked. Then I added all of these instances in the editor again and it worked.
So for anyone having the same issue, deleting the nodes in the editor and adding them again seems to work. This might be a bug in the engine, unless I’m doing something wrong here.