private function visit(&$touched)
    {
        $key = \spl_object_hash($this);
        if (isset($touched[$key])) {
            throw new \RuntimeException("Cycle (endless loop) detected in box graph.");
        }
        $touched[$key] = true;
        // just for convenience
        return $this;
    }