private function getFieldIndex($prevTag, $tag, $fieldIndex)
    {
        if ($prevTag == $tag or '' == $prevTag) {
            return $fieldIndex; // iteration of field index will continue
        }
        $specTag = $this->currentSpec['field']->getTag();
        if (preg_match('/'.$specTag.'/', $tag)) {
            // not same field tag, but field spec tag matches
            return $fieldIndex; // iteration of field index will continue
        }
        // not same field tag, iteration gets reset
        return $this->spec['field']->getIndexStart();
    }