Subscripting code now allows indexes on relations and list relations to be comparable to the item type or a set of the item type, resolves #406