Fixed bugs in Scoped to properly assign parental hierarchy.