It has been a while since the original post but I wanted to update with my solution, for posterity.
I ended up using indexId which is used to index the columns within a table. If you look below, the solution is rather elegant, if I say so myself. :-)