Indexing of sum_type by sub-type, incl. basic test case.
Checks for currently active "data constructor" in sum type.