Unexpected behavior regarding property-based indexing

Dear all, 

while I was fixing a few things on the W3C Thing Description context file [1], I found the behavior of the JSON-LD processor somewhat surprising regarding property-based data indexing (sec. 4.6.1.1 [2]). I'm not sure if it's intentional or not. 

Here is the issue: when I expand the San Francisco Giants example given in the spec, I get an expanded object as expected. But when I attempt to compact it again with the original context, I get the following error: jsonld.SyntaxError: Absolute IRI "schema:jobTitle" confused with prefix "schema". I tried on the JSON-LD playground [3] and with PyLD, for the same result. 

Is there indeed an ambiguity as to URI expansion? 

Thank you, 
Victor 

[1] https://github.com/w3c/wot-thing-description/pull/1077 
[2] https://www.w3.org/TR/json-ld11/#property-based-data-indexing 
[2] https://json-ld.org/playground/#startTab=tab-compacted&json-ld=%7B%22%40id%22%3A%22http%3A%2F%2Fexample.com%2F%22%2C%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FSportsTeam%22%2C%22http%3A%2F%2Fschema.org%2Fathlete%22%3A%5B%7B%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FPerson%22%2C%22http%3A%2F%2Fschema.org%2FjobTitle%22%3A%22Catcher%22%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22Buster%20Posey%22%7D%2C%7B%22%40type%22%3A%22http%3A%2F%2Fschema.org%2FPerson%22%2C%22http%3A%2F%2Fschema.org%2FjobTitle%22%3A%22Starting%20Pitcher%22%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22Madison%20Bumgarner%22%7D%5D%2C%22http%3A%2F%2Fschema.org%2Fname%22%3A%22San%20Francisco%20Giants%22%7D&context=%7B%22%40context%22%3A%7B%22%40version%22%3A1.1%2C%22schema%22%3A%22http%3A%2F%2Fschema.org%2F%22%2C%22name%22%3A%22schema%3Aname%22%2C%22body%22%3A%22schema%3AarticleBody%22%2C%22athletes%22%3A%7B%22%40id%22%3A%22schema%3Aathlete%22%2C%22%40container%22%3A%22%40index%22%2C%22%40index%22%3A%22schema%3AjobTitle%22%7D%7D%7D 

Received on Tuesday, 11 May 2021 19:54:11 UTC