Fix mulitple alias issue in join chain

This issue occurs if user provides same table comes twice in join chain. Both tables should have different aliases so that we don't get ambiguous table error.