add idxs frees for AssocType, also fix a bug in subst of AssocType