Setting removed object to nil = segmentation crash

I have an odd problem if I create an object from a module i.e all the stuff is created in the module, stuck into a display group and returned by the function which I then insert into the main scene group.  When I remove the object from the stage with object:removeSelf() - all good, but then adding object = nil gives a segmentation fault.  I noticed in in build 2177.  Build 2108 doesnt do it and another guy in my team said 2170 didn’t do it.

I have no doubt I must have missed something as the modules have a lot of stuff in them, physics, listeners etc. but I’m also cleaning them up first.  Just wondered what may have changed in the more recent builds to make this happen?