Combination indexing - generalized, self test added.