Making RTree work in advanced compilation mode