Fix for tables added in non-sequential order.