Require destinations when they are needed and do not fetch all of them in advance

Fixes #5266.

- [ ] Implement `NameTree.get()` (B-tree search) and use `tree.get(destinationId)`.