This patches fixes initial issue reported in T67123: Blender shuts down when playing a Rigid Body animation in a linked scene , by cleaning up immediately all objects' RB sim data when we are (re)-creating the scene's RB sim world.
This sounds like a bug in Bullet lib in fact, crashing when trying to remove in object from the sim when it is not actually in it…