Fix alias handling in has_unique_index