Only inherit from root after processing all other inheritance levels.

Otherwise root items that get inherited into higher namespaces can
subsequently override the same item in intermediate namespaces.