Fix a bug in XSpec

Compilation of tests using a combination of x:call[@template] and
x:context failed.

TODO: commit upsteam