HHH-9142 fixed a bug where joining to a non-class-based entity (EntityMode.MAP) would fail, added regression test.