Test and fix attribute config hierarchy.

These attributes get their values from:

1. command-line option
2. target config
3. engine config
4. core config
5. reasonable default

Need to add --registry option to make it complete.