I am not sure you read what I wrote — there is no deep logic to this IMO, it is not narrowed down enough. This could be treated as a minor issue (please check pre-existing ones before reporting it), but in any case, the error is technically correct, because (on 1.5 and master) it tells you that the problem is
ERROR: LoadError: UndefVarError: T not defined
...
in expression starting at ...
which points to the beginning of the struct — that’s the enclosing expression.