Patch for: T30477
This bug occurs when deleting an object in a different scene that is being checked by collision/touch sensor.
This happens because the Python API allows you to access and delete a game object that lives in a different scene to the active one, such as an overlay scene. However, when you delete an object from another scene the game engine tries to delete it from the active scene and not the scene that the object actually lives in. This causes errors as the object is not properly removed.
This patch fixes this by getting the scene the object lives in and deleting it through that scene, rather than the active scene.