Interface ControllerInterface::searchParentOfIn() and ControllerInterface::searchParentOf().
Further refactoring and bugfixing in pasting for hierarchical mode.