Limit depth first search path length.