Applied my fixes to teh V3 branch as well

Applied Fix for:
field name in join with no alias
double where with sourceWhere or destinationWhere
table name prefix in where statements