Ensure option values in Variant#options_text are sorted in a predictable order

Fixes #2432