tg-tag.sh: robustify [;_)] out-of-date ref handling