Fixed a bug when using inner joins on tables with columns with the same names.