Added a fix for instance destroy on objects without parents, objects with
parents are still segfualting.