Validate name overrides whenever they are used

- Ensure that construction of tree generator validates any nameOverrides.
- Minor clean-up.