Bad join query when using attribute tenancy - Ash Framework