When using Mojang's mappings for Registry, the byId(int) method is not mapped to fromId(int) when using SpecialSource.
Here's the original line of code, using Mojang's Mappings:
Registry.ENCHANTMENT.getKey(Registry.ENCHANTMENT.byId(id))
Here's the decompiled actual version (After re-mapping to Spigot):
IRegistry.X.getKey(IRegistry.X.byId(id)))
Here's what's expected:
IRegistry.X.getKey(IRegistry.X.fromId(id)))