Fix xcrate enum namespacing

The chunk of code in encoder.rs was at one point deleted, but must have come back in a rebase or something :(

Closes #19293