Fix: Return correct index of tag/attribute-array in a special case