[subset] fix infinite loop bug in looping through tables for subsetting.
3 files changed