Fixed setting distances as flags in BaseObject.
Remove cyclic from pointers from lowest froms as they cannot actually find the Root object.