Equality between indexed types, bugfixes