More extensive handling of containment semantics