Rebinding locations: reconstitute in tree-order

- always rebind parent locations before child locations
- same for entities