Currently, debugging an incorrect repeating group template which is missing a tag is difficult because the required information (i.e. the tag which caused quickfix to think it had reached the end of the group and therefore had an erroneous group count) is not surfaced anywhere.
Adding the top tag of the stack to the error message makes debugging these issues much simpler.
I'm not sure if it's safe to always assume tv[0] exists - if not, some additional logic will be required.