ensured depth parameter takes precedence over default
fixed unbounded handling in hierarchy