Fixed octree injection failing in some corner cases