Fix for categorical variate constant being exported as id instead of the code

Reviewer: Tiff Go (post commit)

Issue: GCP-9863