Fix for joins on the same depth / id