MODE-2297 Corrected removal of unused identity joins.
Merge pull request #1236 from rhauch/mode-2297

MODE-2297 Corrected removal of unused identity joins.