This issue is the same as digitalbazaar/jsonld.js#435:
The result compacting the IRI http://localhost/@special against base http://localhost/ is @special, which looks like a keyword. The consequence is that the resulted compact JSON-LD does not expand back to the original.
A workaround would be to compact it to ./@special instead.