Update cloneRow function to support vertical spanned cells.