Column names can be duplicated when the cases (upper/lower/mixed) do not match in 1.4.1. In 1.6.0, I have checked it and Spark behaves as expected: the join columns are matched in a case-sensitive fashion. In 1.4.1 joins appear to be case-insensitive even though the results are inconsistent.
I did not find a related ticket, hence I'm opening this one even though it's technically fixed, just in case this happens to be a coincidence.
Here's a minimal example to check:
The last two joins don't execute on 1.6.0 because "id" is not found in rhsId (first case) and "ID" is not found in lhs (second case). On 1.4.1 you can see the difference. The former gives a DataFrame with two columns even though it's clear the rows where matched, and in the latter we see only one.