tgls: fix parsing error

spotted by @edwintorok in #2132