Fixed bug in BVH flat array creation that seg faulted when leaf was also root.