when cleaning up, look for a component in its parent's children and the top level.