protected function set_internal_counter($type, $force = false)
    {
        $last = $this->last_selector;
        if ($force && $last !== null && !isset($this->data[$last])) {
            $this->data[$last] = array();
        }
        $this->last_selector = '{' . $type . (self::$internal_count++) . '}';
        return $last;
    }