fix reloading of RTree from shared memory, potentially fixes a number of issue from #889