Allow setting a depth limit.