Work around plausible bug in tsort

see https://github.com/mjambon/atdgen/issues/9
Add line information to JSON parsing errors
[fix] add missing read_space while skipping extra elements of a tuple