Fix rowIndex for detached table rows