Add test proving that indexOffset is broken for nested elements
Reset indexOffset when creating new depth