Replace ply limit with depth limit