Merge pull request #638 from arvenil/fix-join-equality

Bugfix for join equality when default join type is used
Fixes JOIN duplication issue when default join type equals given join type (issue #373)