# Add the ResultSet's alias
foreach my $key (grep { ! m/\./ } keys %$unique_query) {
-- $unique_query->{"$self->{attrs}{alias}.$key"} = delete $unique_query->{$key};
++ my $alias = $self->{attrs}->{alias};
++ $unique_query->{"$alias.$key"} = delete $unique_query->{$key};
}
push @unique_queries, $unique_query if %$unique_query;