Fix part of logic for overlapping components, though slicing is broken