Updated linker and scope provider to handle the removal of unnecessary
contained named elements from containment paths.