How Resource Merging works within an Hierarchy?