UBI: move and rename attach_by_scanning