Cache map level root nodes, fix uninitialized flags