MODE-1824 Added test case and fix for QOM join